Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 60021bd754c6 ("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>

authored by

Mark Harmstone and committed by
David Sterba
1c7e9111 44e2fda6

+1 -1
+1 -1
fs/btrfs/inode.c
··· 4779 4779 spin_unlock(&dest->root_item_lock); 4780 4780 btrfs_warn(fs_info, 4781 4781 "attempt to delete subvolume %llu with active swapfile", 4782 - btrfs_root_id(root)); 4782 + btrfs_root_id(dest)); 4783 4783 ret = -EPERM; 4784 4784 goto out_up_write; 4785 4785 }