summaryrefslogtreecommitdiffstats
path: root/fs/hpfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hpfs/file.c')
-rw-r--r--fs/hpfs/file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c
index 4a301f593..f284e3d42 100644
--- a/fs/hpfs/file.c
+++ b/fs/hpfs/file.c
@@ -7,12 +7,17 @@
*/
#include <linux/string.h>
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
#include "hpfs_fn.h"
+/* HUH? */
int hpfs_open(struct inode *i, struct file *f)
{
+ lock_kernel();
hpfs_lock_inode(i);
hpfs_unlock_inode(i); /* make sure nobody is deleting the file */
+ unlock_kernel();
if (!i->i_nlink) return -ENOENT;
return 0;
}