Skip to content

Commit

Permalink
Btrfs: release path before starting transaction in can_nocow_extent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Josef Bacik authored and Chris Mason committed Oct 18, 2013
1 parent c00869f commit 1bda19e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1bda19e

Please sign in to comment.