]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
btrfs: Fix the wrong condition judgment about subset extent map
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 22 Sep 2014 01:13:03 +0000 (09:13 +0800)
committerChris Mason <clm@fb.com>
Fri, 3 Oct 2014 23:14:58 +0000 (16:14 -0700)
Previous commit: btrfs: Fix and enhance merge_extent_mapping() to insert
best fitted extent map
is using wrong condition to judgement whether the range is a subset of a
existing extent map.

This may cause bug in btrfs no-holes mode.

This patch will correct the judgment and fix the bug.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/inode.c

index 344a322eb3867ef42bf90b1656cb019ba3874bba..ef6fc587d964ef8bde438dbab5c0bf135dc24825 100644 (file)
@@ -6586,7 +6586,7 @@ insert:
                 * extent causing the -EEXIST.
                 */
                if (start >= extent_map_end(existing) ||
-                   start + len <= existing->start) {
+                   start <= existing->start) {
                        /*
                         * The existing extent map is the one nearest to
                         * the [start, start + len) range which overlaps