diff options
author | David Sterba <dsterba@suse.com> | 2021-07-26 14:15:26 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-08-23 13:19:03 +0200 |
commit | 214cc184321743327c84c4a13ad08d088dfb3c4a (patch) | |
tree | cd0d581c411f8c12f6c1140fdf16ee434c4f8a32 /fs/btrfs/tree-log.c | |
parent | d58ede8d1d9fb0f70d6aa51fa6550d2d580f8c17 (diff) | |
download | lwn-214cc184321743327c84c4a13ad08d088dfb3c4a.tar.gz lwn-214cc184321743327c84c4a13ad08d088dfb3c4a.zip |
btrfs: constify and cleanup variables in comparators
Comparators just read the data and thus get const parameters. This
should be also preserved by the local variables, update all comparators
passed to sort or bsearch.
Cleanups:
- unnecessary casts are dropped
- btrfs_cmp_device_free_bytes is cleaned up to follow the common pattern
and 'inline' is dropped as the function address is taken
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 8dde5c08a48f..191dea1d2416 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4191,7 +4191,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, static int extent_cmp(void *priv, const struct list_head *a, const struct list_head *b) { - struct extent_map *em1, *em2; + const struct extent_map *em1, *em2; em1 = list_entry(a, struct extent_map, list); em2 = list_entry(b, struct extent_map, list); |