aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/afs/super.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c
index efc4fe69f4f0..77e68759788f 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -212,7 +212,7 @@ static int afs_test_super(struct super_block *sb, void *data)
212/* 212/*
213 * fill in the superblock 213 * fill in the superblock
214 */ 214 */
215static int afs_fill_super(struct super_block *sb, void *data, int silent) 215static int afs_fill_super(struct super_block *sb, void *data)
216{ 216{
217 struct afs_mount_params *params = data; 217 struct afs_mount_params *params = data;
218 struct afs_super_info *as = NULL; 218 struct afs_super_info *as = NULL;
@@ -319,17 +319,23 @@ static int afs_get_sb(struct file_system_type *fs_type,
319 goto error; 319 goto error;
320 } 320 }
321 321
322 sb->s_flags = flags; 322 if (!sb->s_root) {
323 323 /* initial superblock/root creation */
324 ret = afs_fill_super(sb, &params, flags & MS_SILENT ? 1 : 0); 324 _debug("create");
325 if (ret < 0) { 325 sb->s_flags = flags;
326 up_write(&sb->s_umount); 326 ret = afs_fill_super(sb, &params);
327 deactivate_super(sb); 327 if (ret < 0) {
328 goto error; 328 up_write(&sb->s_umount);
329 deactivate_super(sb);
330 goto error;
331 }
332 sb->s_flags |= MS_ACTIVE;
333 } else {
334 _debug("reuse");
335 ASSERTCMP(sb->s_flags, &, MS_ACTIVE);
329 } 336 }
330 sb->s_flags |= MS_ACTIVE;
331 simple_set_mnt(mnt, sb);
332 337
338 simple_set_mnt(mnt, sb);
333 afs_put_volume(params.volume); 339 afs_put_volume(params.volume);
334 afs_put_cell(params.default_cell); 340 afs_put_cell(params.default_cell);
335 _leave(" = 0 [%p]", sb); 341 _leave(" = 0 [%p]", sb);