mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
Btrfs: fix ordered extent check in btrfs_punch_hole
If the ordered extent's last byte was 1 less than our region's start byte, we would unnecessarily wait for the completion of that ordered extent, because it doesn't intersect our target range. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
376cc685cb
commit
6126e3caf7
1 changed files with 1 additions and 1 deletions
|
@ -2164,7 +2164,7 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len)
|
|||
* we need to try again.
|
||||
*/
|
||||
if ((!ordered ||
|
||||
(ordered->file_offset + ordered->len < lockstart ||
|
||||
(ordered->file_offset + ordered->len <= lockstart ||
|
||||
ordered->file_offset > lockend)) &&
|
||||
!test_range_bit(&BTRFS_I(inode)->io_tree, lockstart,
|
||||
lockend, EXTENT_UPTODATE, 0,
|
||||
|
|
Loading…
Reference in a new issue