diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-17 01:00:31 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-08 19:33:22 -0500 |
commit | 98c7089c769048f941bd5c5285287f8fc301f8b1 (patch) | |
tree | 3e31f46b43fb1b533dc720db7a9d84da3b148433 /fs/btrfs/disk-io.c | |
parent | 48fa57ac2c30a8a0b770b7ad50b4b30c1d12f005 (diff) | |
download | linux-98c7089c769048f941bd5c5285287f8fc301f8b1.tar.bz2 |
btrfs: preparation to fixing mount/umount race
We need fs_info and root to live until the moment when the victim
superblock leaves the list, so we need to postpone free_fs_info()
until after ->put_super(). The call is buried in close_ctree(),
though, so we need to lift it into the callers (including
btrfs_put_super()) first.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index f99a099a7747..dcb5d949b543 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2424,6 +2424,7 @@ retry_root_backup: up_read(&fs_info->cleanup_work_sem); if (err) { close_ctree(tree_root); + free_fs_info(fs_info); return ERR_PTR(err); } } @@ -3059,8 +3060,6 @@ int close_ctree(struct btrfs_root *root) bdi_destroy(&fs_info->bdi); cleanup_srcu_struct(&fs_info->subvol_srcu); - free_fs_info(fs_info); - return 0; } |