aboutsummaryrefslogtreecommitdiffstats
path: root/fs/freevxfs/vxfs_super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/freevxfs/vxfs_super.c')
-rw-r--r--fs/freevxfs/vxfs_super.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c
index dc0c041e85cb..eb2b9e09c996 100644
--- a/fs/freevxfs/vxfs_super.c
+++ b/fs/freevxfs/vxfs_super.c
@@ -148,7 +148,7 @@ static int vxfs_remount(struct super_block *sb, int *flags, char *data)
148 * The superblock on success, else %NULL. 148 * The superblock on success, else %NULL.
149 * 149 *
150 * Locking: 150 * Locking:
151 * We are under the bkl and @sbp->s_lock. 151 * We are under @sbp->s_lock.
152 */ 152 */
153static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent) 153static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent)
154{ 154{
@@ -159,11 +159,14 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent)
159 struct inode *root; 159 struct inode *root;
160 int ret = -EINVAL; 160 int ret = -EINVAL;
161 161
162 lock_kernel();
163
162 sbp->s_flags |= MS_RDONLY; 164 sbp->s_flags |= MS_RDONLY;
163 165
164 infp = kzalloc(sizeof(*infp), GFP_KERNEL); 166 infp = kzalloc(sizeof(*infp), GFP_KERNEL);
165 if (!infp) { 167 if (!infp) {
166 printk(KERN_WARNING "vxfs: unable to allocate incore superblock\n"); 168 printk(KERN_WARNING "vxfs: unable to allocate incore superblock\n");
169 unlock_kernel();
167 return -ENOMEM; 170 return -ENOMEM;
168 } 171 }
169 172
@@ -236,6 +239,7 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent)
236 goto out_free_ilist; 239 goto out_free_ilist;
237 } 240 }
238 241
242 unlock_kernel();
239 return 0; 243 return 0;
240 244
241out_free_ilist: 245out_free_ilist:
@@ -245,6 +249,7 @@ out_free_ilist:
245out: 249out:
246 brelse(bp); 250 brelse(bp);
247 kfree(infp); 251 kfree(infp);
252 unlock_kernel();
248 return ret; 253 return ret;
249} 254}
250 255