]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: use right root when checking for hash collision
authorJosef Bacik <jbacik@fusionio.com>
Wed, 9 Oct 2013 16:24:04 +0000 (12:24 -0400)
committerChris Mason <chris.mason@fusionio.com>
Fri, 11 Oct 2013 01:27:45 +0000 (21:27 -0400)
commit1d388bbd5304d7679ab61132adaf1171d3f5339c
tree00cfb64474f911d76db079c5a0f44b84de7e6ac8
parent2bfa73ef6c4af0a12d114e8a139754c2b0de7cfa
Btrfs: use right root when checking for hash collision

btrfs_rename was using the root of the old dir instead of the root of the new
dir when checking for a hash collision, so if you tried to move a file into a
subvol it would freak out because it would see the file you are trying to move
in its current root.  This fixes the bug where this would fail

btrfs subvol create test1
btrfs subvol create test2
mv test1 test2.

Thanks to Chris Murphy for catching this,

Cc: stable@vger.kernel.org
Reported-by: Chris Murphy <lists@colorremedies.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/inode.c