diff options
author | Filipe David Borba Manana <fdmanana@gmail.com> | 2013-11-19 16:19:24 +0000 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-28 13:19:42 -0800 |
commit | 6126e3caf7468a07cc1a8239d9e95090acedd3ca (patch) | |
tree | 51dfdf6d48ecbe4c134bf26474f273954fb074b0 /fs/btrfs/file.c | |
parent | 376cc685cb3b43a6509de0b6a343c4079f23c239 (diff) | |
download | blackbird-obmc-linux-6126e3caf7468a07cc1a8239d9e95090acedd3ca.tar.gz blackbird-obmc-linux-6126e3caf7468a07cc1a8239d9e95090acedd3ca.zip |
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>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 6cd003c3f05e..740ae8c71701 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -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, |