aboutsummaryrefslogtreecommitdiff
path: root/fs/ramfs
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2020-02-24 09:19:02 +0800
committerDavid Sterba <dsterba@suse.com>2020-05-25 11:25:18 +0200
commit2a979612d594c16953ca512f2de7f0bb385ffb65 (patch)
tree10569ba060c0aa9d672fbbdb1f0be27f47e266e4 /fs/ramfs
parent4d81ea8bb4fc40903f4950b082955c709d785467 (diff)
btrfs: reloc: use wrapper to replace open-coded edge linking
Since backref_edge is used to connect upper and lower backref nodes, and needs to access both nodes, some code can look pretty nasty: list_add_tail(&edge->list[LOWER], &cur->upper); The above code will link @cur to the LOWER side of the edge, while both "LOWER" and "upper" words show up. This can sometimes be very confusing for reader to grasp. This patch introduces a new wrapper, link_backref_edge(), to handle the linking behavior. Which also has extra ASSERT() to ensure caller won't pass wrong nodes. Also, this updates the comment of related lists of backref_node and backref_edge, to make it more clear that each list points to what. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/ramfs')
0 files changed, 0 insertions, 0 deletions