mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-27 01:11:31 +00:00
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 <sage@inktank.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
parent
c00869f1ae
commit
1bda19eb73
1 changed files with 1 additions and 0 deletions
|
|
@ -6437,6 +6437,7 @@ noinline int can_nocow_extent(struct inode *inode, u64 offset, u64 *len,
|
||||||
|
|
||||||
if (btrfs_extent_readonly(root, disk_bytenr))
|
if (btrfs_extent_readonly(root, disk_bytenr))
|
||||||
goto out;
|
goto out;
|
||||||
|
btrfs_release_path(path);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* look for other files referencing this extent, if we
|
* look for other files referencing this extent, if we
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue