diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-10-18 12:10:36 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-10-18 12:43:40 -0400 |
commit | 1bda19eb73d68b304148e67253e47cef049a419d (patch) | |
tree | 19f7e0ed19c2146b125bff6f5f74c1cc9a386668 /fs | |
parent | c00869f1ae6a8fa49802d5e60d843b7051a112ec (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
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, | |||
6437 | 6437 | ||
6438 | if (btrfs_extent_readonly(root, disk_bytenr)) | 6438 | if (btrfs_extent_readonly(root, disk_bytenr)) |
6439 | goto out; | 6439 | goto out; |
6440 | btrfs_release_path(path); | ||
6440 | 6441 | ||
6441 | /* | 6442 | /* |
6442 | * look for other files referencing this extent, if we | 6443 | * look for other files referencing this extent, if we |