summaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
commitf1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch)
tree562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /fs/coda
parent00f11569ac8ca73cbcdef8822de1583e79aee571 (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')
-rw-r--r--fs/coda/dir.c2
-rw-r--r--fs/coda/pioctl.c25
-rw-r--r--fs/coda/psdev.c10
3 files changed, 14 insertions, 23 deletions
diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index f5c53fac2..e53933710 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -635,6 +635,7 @@ int coda_release(struct inode *i, struct file *f)
unsigned short cflags = coda_flags_to_cflags(flags);
struct coda_cred *cred;
+ lock_kernel();
ENTRY;
coda_vfs_stat.release++;
@@ -655,6 +656,7 @@ int coda_release(struct inode *i, struct file *f)
CODA_FREE(cred, sizeof(*cred));
CDEBUG(D_FILE, "coda_release: result: %d\n", error);
+ unlock_kernel();
return error;
}
diff --git a/fs/coda/pioctl.c b/fs/coda/pioctl.c
index dd2636895..711beee06 100644
--- a/fs/coda/pioctl.c
+++ b/fs/coda/pioctl.c
@@ -16,6 +16,8 @@
#include <linux/locks.h>
#include <asm/segment.h>
#include <linux/string.h>
+#define __NO_VERSION__
+#include <linux/module.h>
#include <asm/uaccess.h>
#include <linux/coda.h>
@@ -26,8 +28,6 @@
/* pioctl ops */
static int coda_ioctl_permission(struct inode *inode, int mask);
-static int coda_ioctl_open(struct inode *i, struct file *f);
-static int coda_ioctl_release(struct inode *i, struct file *f);
static int coda_pioctl(struct inode * inode, struct file * filp,
unsigned int cmd, unsigned long arg);
@@ -39,9 +39,8 @@ struct inode_operations coda_ioctl_inode_operations =
};
struct file_operations coda_ioctl_operations = {
+ owner: THIS_MODULE,
ioctl: coda_pioctl,
- open: coda_ioctl_open,
- release: coda_ioctl_release,
};
/* the coda pioctl inode ops */
@@ -52,24 +51,6 @@ static int coda_ioctl_permission(struct inode *inode, int mask)
return 0;
}
-/* The pioctl file ops*/
-int coda_ioctl_open(struct inode *i, struct file *f)
-{
- ENTRY;
-
- CDEBUG(D_PIOCTL, "File inode number: %ld\n",
- f->f_dentry->d_inode->i_ino);
-
- EXIT;
- return 0;
-}
-
-int coda_ioctl_release(struct inode *i, struct file *f)
-{
- return 0;
-}
-
-
static int coda_pioctl(struct inode * inode, struct file * filp,
unsigned int cmd, unsigned long user_data)
{
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;
}