Skip to content
/ linux Public

Commit a78db32

Browse files
maharmstonegregkh
authored andcommitted
btrfs: print correct subvol num if active swapfile prevents deletion
[ Upstream commit 1c7e911 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 390cc89 commit a78db32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4629,7 +4629,7 @@ int btrfs_delete_subvolume(struct btrfs_inode *dir, struct dentry *dentry)
46294629
spin_unlock(&dest->root_item_lock);
46304630
btrfs_warn(fs_info,
46314631
"attempt to delete subvolume %llu with active swapfile",
4632-
btrfs_root_id(root));
4632+
btrfs_root_id(dest));
46334633
ret = -EPERM;
46344634
goto out_up_write;
46354635
}

0 commit comments

Comments
 (0)