diff options
author | Josef Bacik <josef@toxicpanda.com> | 2017-10-19 14:15:58 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-11-01 15:45:35 -0400 |
commit | c7ad7c843965d8691269f581e132633a4ca9ef91 (patch) | |
tree | d4150fe735beb77a7efcf461a0a8a34e0fd4ad9a /fs/btrfs | |
parent | 69fe2d75dd91d0124ad2ab6e9fef07633bd730e0 (diff) |
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 <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/delayed-ref.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index a2973340a94f..bc940bb374cf 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c | |||
@@ -40,8 +40,8 @@ struct kmem_cache *btrfs_delayed_extent_op_cachep; | |||
40 | /* | 40 | /* |
41 | * compare two delayed tree backrefs with same bytenr and type | 41 | * compare two delayed tree backrefs with same bytenr and type |
42 | */ | 42 | */ |
43 | static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref2, | 43 | static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref1, |
44 | struct btrfs_delayed_tree_ref *ref1) | 44 | struct btrfs_delayed_tree_ref *ref2) |
45 | { | 45 | { |
46 | if (ref1->node.type == BTRFS_TREE_BLOCK_REF_KEY) { | 46 | if (ref1->node.type == BTRFS_TREE_BLOCK_REF_KEY) { |
47 | if (ref1->root < ref2->root) | 47 | if (ref1->root < ref2->root) |
@@ -60,8 +60,8 @@ static int comp_tree_refs(struct btrfs_delayed_tree_ref *ref2, | |||
60 | /* | 60 | /* |
61 | * compare two delayed data backrefs with same bytenr and type | 61 | * compare two delayed data backrefs with same bytenr and type |
62 | */ | 62 | */ |
63 | static int comp_data_refs(struct btrfs_delayed_data_ref *ref2, | 63 | static int comp_data_refs(struct btrfs_delayed_data_ref *ref1, |
64 | struct btrfs_delayed_data_ref *ref1) | 64 | struct btrfs_delayed_data_ref *ref2) |
65 | { | 65 | { |
66 | if (ref1->node.type == BTRFS_EXTENT_DATA_REF_KEY) { | 66 | if (ref1->node.type == BTRFS_EXTENT_DATA_REF_KEY) { |
67 | if (ref1->root < ref2->root) | 67 | if (ref1->root < ref2->root) |