]> git.hungrycats.org Git - linux/commit
btrfs: don't double lock the subvol_sem
authorJosef Bacik <josef@toxicpanda.com>
Tue, 19 Nov 2019 16:13:31 +0000 (08:13 -0800)
committerJosef Bacik <josef@toxicpanda.com>
Tue, 19 Nov 2019 18:56:15 +0000 (10:56 -0800)
commita265329fd495c74a76f1f24bd6fce1746f943de0
tree0d3d98272a28a446fe4d9cac20ee5d891dc3b47f
parent015c6e3f16d7b188d782728e40ee16ddf2ebb0ae
btrfs: don't double lock the subvol_sem

If we're rename exchanging two subvols we'll try to lock this lock
twice, which is bad.  Just lock once if either of the ino's are subvols.

cc: stable@vger.kernel.org
Fixes: cdd1fedf8261 ("btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT")
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
fs/btrfs/inode.c