patch-2.4.0-test4 linux/fs/coda/psdev.c
Next file: linux/fs/dcache.c
Previous file: linux/fs/coda/pioctl.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Wed Jul 12 21:58:43 2000
- Orig file:
v2.4.0-test3/linux/fs/coda/psdev.c
- Orig date:
Mon Jul 10 16:47:25 2000
diff -u --recursive --new-file v2.4.0-test3/linux/fs/coda/psdev.c linux/fs/coda/psdev.c
@@ -292,6 +292,7 @@
ENTRY;
/* first opener, initialize */
+ lock_kernel();
if (!vcp->vc_inuse++) {
INIT_LIST_HEAD(&vcp->vc_pending);
INIT_LIST_HEAD(&vcp->vc_processing);
@@ -301,6 +302,7 @@
CDEBUG(D_PSDEV, "inuse: %d\n", vcp->vc_inuse);
EXIT;
+ unlock_kernel();
return 0;
}
@@ -312,13 +314,18 @@
struct list_head *lh, *next;
ENTRY;
+ lock_kernel();
if ( !vcp->vc_inuse ) {
+ unlock_kernel();
printk("psdev_release: Not open.\n");
return -1;
}
CDEBUG(D_PSDEV, "psdev_release: inuse %d\n", vcp->vc_inuse);
- if (--vcp->vc_inuse) return 0;
+ if (--vcp->vc_inuse) {
+ unlock_kernel();
+ return 0;
+ }
/* Wakeup clients so they can return. */
CDEBUG(D_PSDEV, "wake up pending clients\n");
@@ -347,6 +354,7 @@
CDEBUG(D_PSDEV, "Done.\n");
EXIT;
+ unlock_kernel();
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)