summaryrefslogtreecommitdiffstats
path: root/fs/hpfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hpfs')
-rw-r--r--fs/hpfs/file.c5
-rw-r--r--fs/hpfs/inode.c4
2 files changed, 9 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;
}
diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c
index 7938970c8..a9f085863 100644
--- a/fs/hpfs/inode.c
+++ b/fs/hpfs/inode.c
@@ -6,6 +6,8 @@
* inode VFS functions
*/
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
#include "hpfs_fn.h"
static struct file_operations hpfs_file_ops =
@@ -313,6 +315,8 @@ void hpfs_write_if_changed(struct inode *inode)
void hpfs_delete_inode(struct inode *inode)
{
+ lock_kernel();
hpfs_remove_fnode(inode->i_sb, inode->i_ino);
+ unlock_kernel();
clear_inode(inode);
}