aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/ioctl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 362720a3fea2..38f2169b73a4 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2312,16 +2312,16 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
2312 * again is not run concurrently. 2312 * again is not run concurrently.
2313 */ 2313 */
2314 spin_lock(&dest->root_item_lock); 2314 spin_lock(&dest->root_item_lock);
2315 root_flags = btrfs_root_flags(&root->root_item); 2315 root_flags = btrfs_root_flags(&dest->root_item);
2316 if (root->send_in_progress == 0) { 2316 if (dest->send_in_progress == 0) {
2317 btrfs_set_root_flags(&root->root_item, 2317 btrfs_set_root_flags(&dest->root_item,
2318 root_flags | BTRFS_ROOT_SUBVOL_DEAD); 2318 root_flags | BTRFS_ROOT_SUBVOL_DEAD);
2319 spin_unlock(&dest->root_item_lock); 2319 spin_unlock(&dest->root_item_lock);
2320 } else { 2320 } else {
2321 spin_unlock(&dest->root_item_lock); 2321 spin_unlock(&dest->root_item_lock);
2322 btrfs_warn(root->fs_info, 2322 btrfs_warn(root->fs_info,
2323 "Attempt to delete subvolume %llu during send", 2323 "Attempt to delete subvolume %llu during send",
2324 root->root_key.objectid); 2324 dest->root_key.objectid);
2325 err = -EPERM; 2325 err = -EPERM;
2326 goto out_dput; 2326 goto out_dput;
2327 } 2327 }
@@ -2416,8 +2416,8 @@ out_up_write:
2416out_unlock: 2416out_unlock:
2417 if (err) { 2417 if (err) {
2418 spin_lock(&dest->root_item_lock); 2418 spin_lock(&dest->root_item_lock);
2419 root_flags = btrfs_root_flags(&root->root_item); 2419 root_flags = btrfs_root_flags(&dest->root_item);
2420 btrfs_set_root_flags(&root->root_item, 2420 btrfs_set_root_flags(&dest->root_item,
2421 root_flags & ~BTRFS_ROOT_SUBVOL_DEAD); 2421 root_flags & ~BTRFS_ROOT_SUBVOL_DEAD);
2422 spin_unlock(&dest->root_item_lock); 2422 spin_unlock(&dest->root_item_lock);
2423 } 2423 }