From: Josef Bacik Date: Fri, 18 Oct 2013 16:10:36 +0000 (-0400) Subject: Btrfs: release path before starting transaction in can_nocow_extent X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1bda19eb73d68b304148e67253e47cef049a419d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Btrfs: release path before starting transaction in can_nocow_extent We can't be holding tree locks while we try to start a transaction, we will deadlock. Thanks, Reported-by: Sage Weil Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3b4ffaf0cd52..f4a6851e6c88 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6437,6 +6437,7 @@ noinline int can_nocow_extent(struct inode *inode, u64 offset, u64 *len, if (btrfs_extent_readonly(root, disk_bytenr)) goto out; + btrfs_release_path(path); /* * look for other files referencing this extent, if we