Btrfs: fix comp_oper to get right order
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 13 Mar 2015 06:24:38 +0000 (14:24 +0800)
committerChris Mason <clm@fb.com>
Fri, 13 Mar 2015 20:46:59 +0000 (13:46 -0700)
Case (oper1->seq > oper2->seq) should differ with case (oper1->seq < oper2->seq).

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/qgroup.c

index 97159a8e91d40b24ca1a8f6367892ecf2ad8b960..058c79eecbfb96825918a370e3f78d926b49b098 100644 (file)
@@ -1259,7 +1259,7 @@ static int comp_oper(struct btrfs_qgroup_operation *oper1,
        if (oper1->seq < oper2->seq)
                return -1;
        if (oper1->seq > oper2->seq)
-               return -1;
+               return 1;
        if (oper1->ref_root < oper2->ref_root)
                return -1;
        if (oper1->ref_root > oper2->ref_root)