Btrfs: fix ordered extent check in btrfs_punch_hole
[sfrench/cifs-2.6.git] / fs / btrfs / file.c
index 6cd003c3f05ec318092b766fbc0e6322175911e2..740ae8c71701077de03396fc0c0bae377100ad4c 100644 (file)
@@ -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,