summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dlmfs/dlmfs.c9
-rw-r--r--fs/ocfs2/super.c5
2 files changed, 13 insertions, 1 deletions
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index c2903b84bb7a..667d7ceba8c9 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -44,6 +44,7 @@
#include <linux/string.h>
#include <linux/backing-dev.h>
#include <linux/poll.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
@@ -588,21 +589,27 @@ static int dlmfs_fill_super(struct super_block * sb,
struct inode * inode;
struct dentry * root;
+ lock_kernel();
+
sb->s_maxbytes = MAX_LFS_FILESIZE;
sb->s_blocksize = PAGE_CACHE_SIZE;
sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
sb->s_magic = DLMFS_MAGIC;
sb->s_op = &dlmfs_ops;
inode = dlmfs_get_root_inode(sb);
- if (!inode)
+ if (!inode) {
+ unlock_kernel();
return -ENOMEM;
+ }
root = d_alloc_root(inode);
if (!root) {
iput(inode);
+ unlock_kernel();
return -ENOMEM;
}
sb->s_root = root;
+ unlock_kernel();
return 0;
}
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index fa1be1b304d1..b7e4f2d19d40 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1002,6 +1002,8 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
char nodestr[8];
struct ocfs2_blockcheck_stats stats;
+ lock_kernel();
+
mlog_entry("%p, %p, %i", sb, data, silent);
if (!ocfs2_parse_options(sb, data, &parsed_options, 0)) {
@@ -1179,6 +1181,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
atomic_set(&osb->vol_state, VOLUME_DISABLED);
wake_up(&osb->osb_mount_event);
mlog_exit(status);
+ unlock_kernel();
return status;
}
}
@@ -1193,6 +1196,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
ocfs2_orphan_scan_start(osb);
mlog_exit(status);
+ unlock_kernel();
return status;
read_super_error:
@@ -1208,6 +1212,7 @@ read_super_error:
}
mlog_exit(status);
+ unlock_kernel();
return status;
}