Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286029
b: refs/heads/master
c: 59553ed
h: refs/heads/master
i:
  286027: 300b066
v: v3
  • Loading branch information
Al Viro committed Jan 9, 2012
1 parent f4634ba commit 45fa786
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d22ca7de770e2a683eac000ba4db5a95e2f4c969
refs/heads/master: 59553edf110e5576d91be9dd5bd53d110e0d0290
21 changes: 5 additions & 16 deletions trunk/fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ static int btrfs_fill_super(struct super_block *sb,

save_mount_options(sb, data);
cleancache_init_fs(sb);
sb->s_flags |= MS_ACTIVE;
return 0;

fail_close:
Expand Down Expand Up @@ -929,14 +930,10 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
}

if (s->s_root) {
if ((flags ^ s->s_flags) & MS_RDONLY) {
deactivate_locked_super(s);
error = -EBUSY;
goto error_close_devices;
}

btrfs_close_devices(fs_devices);
free_fs_info(fs_info);
if ((flags ^ s->s_flags) & MS_RDONLY)
error = -EBUSY;
} else {
char b[BDEVNAME_SIZE];

Expand All @@ -945,19 +942,11 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
btrfs_sb(s)->fs_info->bdev_holder = fs_type;
error = btrfs_fill_super(s, fs_devices, data,
flags & MS_SILENT ? 1 : 0);
if (error) {
deactivate_locked_super(s);
return ERR_PTR(error);
}

s->s_flags |= MS_ACTIVE;
}

root = get_default_root(s, subvol_objectid);
if (IS_ERR(root)) {
root = !error ? get_default_root(s, subvol_objectid) : ERR_PTR(error);
if (IS_ERR(root))
deactivate_locked_super(s);
return root;
}

return root;

Expand Down

0 comments on commit 45fa786

Please sign in to comment.