Skip to content

Commit c7ad7c8

Browse files
josefbacikkdave
authored andcommitted
btrfs: switch args for comp_*_refs
Make it more consistent, we want the inserted ref to be compared against what's already in there. This will make the order go from lowest seq -> highest seq, which will make us more likely to make forward progress if there's a seqlock currently held. Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 69fe2d7 commit c7ad7c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/btrfs/delayed-ref.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ struct kmem_cache *btrfs_delayed_extent_op_cachep;
4040
/*
4141
* compare two delayed tree backrefs with same bytenr and type
4242
*/
43-
static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref2,
44-
struct btrfs_delayed_tree_ref *ref1)
43+
static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref1,
44+
struct btrfs_delayed_tree_ref *ref2)
4545
{
4646
if (ref1->node.type == BTRFS_TREE_BLOCK_REF_KEY) {
4747
if (ref1->root < ref2->root)
@@ -60,8 +60,8 @@ static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref2,
6060
/*
6161
* compare two delayed data backrefs with same bytenr and type
6262
*/
63-
static int comp_data_refs(struct btrfs_delayed_data_ref *ref2,
64-
struct btrfs_delayed_data_ref *ref1)
63+
static int comp_data_refs(struct btrfs_delayed_data_ref *ref1,
64+
struct btrfs_delayed_data_ref *ref2)
6565
{
6666
if (ref1->node.type == BTRFS_EXTENT_DATA_REF_KEY) {
6767
if (ref1->root < ref2->root)

0 commit comments

Comments
 (0)