Merge tag 'trace-seq-buf-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/roste...
[cascardo/linux.git] / drivers / md / dm-bio-prison.c
index bbe22a5..be06530 100644 (file)
@@ -95,10 +95,10 @@ static int cmp_keys(struct dm_cell_key *lhs,
        if (lhs->dev > rhs->dev)
                return 1;
 
-       if (lhs->block < rhs->block)
+       if (lhs->block_end <= rhs->block_begin)
                return -1;
 
-       if (lhs->block > rhs->block)
+       if (lhs->block_begin >= rhs->block_end)
                return 1;
 
        return 0;