diff options
author | Chris Mason <chris.mason@fusionio.com> | 2013-10-05 14:51:32 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-10-05 14:51:32 (GMT) |
commit | 1329dfc8bb8932976844438cd5e757c720d6f1ff (patch) | |
tree | 3ee7f40236ee5fc7961e285089da255caddab38a /fs/btrfs/volumes.c | |
parent | 15c03dd4859ab16f9212238f29dd315654aa94f6 (diff) | |
parent | 1357272fc7deeebb7b3c5d1a071562edc273cdaf (diff) | |
download | linux-fsl-qoriq-1329dfc8bb8932976844438cd5e757c720d6f1ff.tar.xz |
Merge branch 'for-linus' into for-linus-3.12
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index a106458..043b215 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1716,6 +1716,7 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info, struct btrfs_device *srcdev) { WARN_ON(!mutex_is_locked(&fs_info->fs_devices->device_list_mutex)); + list_del_rcu(&srcdev->dev_list); list_del_rcu(&srcdev->dev_alloc_list); fs_info->fs_devices->num_devices--; @@ -1725,9 +1726,13 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info, } if (srcdev->can_discard) fs_info->fs_devices->num_can_discard--; - if (srcdev->bdev) + if (srcdev->bdev) { fs_info->fs_devices->open_devices--; + /* zero out the old super */ + btrfs_scratch_superblock(srcdev); + } + call_rcu(&srcdev->rcu, free_device); } |