diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
commit | f1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch) | |
tree | 562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /fs/coda/psdev.c | |
parent | 00f11569ac8ca73cbcdef8822de1583e79aee571 (diff) |
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'fs/coda/psdev.c')
-rw-r--r-- | fs/coda/psdev.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index 695e4158c..c475b73ac 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c @@ -292,6 +292,7 @@ static int coda_psdev_open(struct inode * inode, struct file * file) 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 @@ static int coda_psdev_open(struct inode * inode, struct file * file) CDEBUG(D_PSDEV, "inuse: %d\n", vcp->vc_inuse); EXIT; + unlock_kernel(); return 0; } @@ -312,13 +314,18 @@ static int coda_psdev_release(struct inode * inode, struct file * file) 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 @@ static int coda_psdev_release(struct inode * inode, struct file * file) CDEBUG(D_PSDEV, "Done.\n"); EXIT; + unlock_kernel(); return 0; } |