ocfs2: Fix contiguousness check in ocfs2_try_to_merge_extent_map()
authorRoel Kluin <roel.kluin@gmail.com>
Fri, 5 Feb 2010 09:26:27 +0000 (10:26 +0100)
committerJoel Becker <joel.becker@oracle.com>
Fri, 5 Feb 2010 23:06:21 +0000 (15:06 -0800)
The wrong member was compared in the continguousness check.

Acked-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/extent_map.c

index d35a27f..5328529 100644 (file)
@@ -192,7 +192,7 @@ static int ocfs2_try_to_merge_extent_map(struct ocfs2_extent_map_item *emi,
                emi->ei_clusters += ins->ei_clusters;
                return 1;
        } else if ((ins->ei_phys + ins->ei_clusters) == emi->ei_phys &&
-                  (ins->ei_cpos + ins->ei_clusters) == emi->ei_phys &&
+                  (ins->ei_cpos + ins->ei_clusters) == emi->ei_cpos &&
                   ins->ei_flags == emi->ei_flags) {
                emi->ei_phys = ins->ei_phys;
                emi->ei_cpos = ins->ei_cpos;