btrfs: print correct subvol num if can't delete because of active swapfile
PATCH 1/1 btrfs: print correct subvol num if can't delete because of active swapfile
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")
Signed-off-by Mark Harmstone <[email protected]>
--- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/inode.c +1 -1
@@ -4804,7 +4804,7 @@ int btrfs_delete_subvolume(struct btrfs_inode *dir, struct dentry *dentry)spin_unlock (&dest->root_item_lock);btrfs_warn (fs_info,"attempt to delete subvolume %llu with active swapfile" , -btrfs_root_id (root)); +btrfs_root_id (dest)); ret = -EPERM ; goto out_up_write; }
Signature · 1 line
2.52.0
Quoted 7 lines · Mark Harmstone
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")Signed-off-by Mark Harmstone <[email protected]>
Reviewed-by Filipe Manana <[email protected]>
Looks good, thanks.
Quoted 21 lines
--- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/inode.c +1
-2@@ -4804,7 +4804,7 @@ int btrfs_delete_subvolume(struct btrfs_inode *dir, struct dentry *dentry)spin_unlock (&dest->root_item_lock);btrfs_warn (fs_info,"attempt to delete subvolume %llu with active swapfile" , -btrfs_root_id (root)); +btrfs_root_id (dest)); ret = -EPERM ; goto out_up_write; } --2.52.0
Quoted 6 lines · Mark Harmstone
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")Signed-off-by Mark Harmstone <[email protected]>
Reviewed-by Qu Wenruo <[email protected]>
Thanks,
Qu
Quoted 17 lines
--- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/inode.c +1
-1@@ -4804,7 +4804,7 @@ int btrfs_delete_subvolume(struct btrfs_inode *dir, struct dentry *dentry)spin_unlock (&dest->root_item_lock);btrfs_warn (fs_info,"attempt to delete subvolume %llu with active swapfile" , -btrfs_root_id (root)); +btrfs_root_id (dest)); ret = -EPERM ; goto out_up_write; }