Skip to content

Commit 1c7e911

Browse files
maharmstonekdave
authored andcommitted
btrfs: print correct subvol num if active swapfile prevents deletion
Fix the error message in btrfs_delete_subvolume() if we can't delete a subvolume because it has an active swapfile: we were printing the number of the parent rather than the target. Fixes: 60021bd ("btrfs: prevent subvol with swapfile from being deleted") Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Mark Harmstone <mark@harmstone.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 44e2fda commit 1c7e911

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/btrfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4779,7 +4779,7 @@ int btrfs_delete_subvolume(struct btrfs_inode *dir, struct dentry *dentry)
47794779
spin_unlock(&dest->root_item_lock);
47804780
btrfs_warn(fs_info,
47814781
"attempt to delete subvolume %llu with active swapfile",
4782-
btrfs_root_id(root));
4782+
btrfs_root_id(dest));
47834783
ret = -EPERM;
47844784
goto out_up_write;
47854785
}

0 commit comments

Comments
 (0)