diff options
Diffstat (limited to 'fs/freevxfs/vxfs_super.c')
-rw-r--r-- | fs/freevxfs/vxfs_super.c | 7 |
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 | */ |
153 | static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent) | 153 | static 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 | ||
241 | out_free_ilist: | 245 | out_free_ilist: |
@@ -245,6 +249,7 @@ out_free_ilist: | |||
245 | out: | 249 | out: |
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 | ||