From f1da2c3860e301527d56a1ef0b56c649ee7c4b1b Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 15 Jul 2000 03:32:22 +0000 Subject: 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. --- fs/coda/psdev.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'fs/coda/psdev.c') 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; } -- cgit v1.2.3