diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-10-19 10:50:59 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:42 +0100 |
commit | ad1ac5012c2beccc9de4d3e2cc1382fd250e5540 (patch) | |
tree | 0e733f175467c9c8953412d818817f67bf36aac8 /fs/btrfs/accessors.h | |
parent | 818fe33aed42ddd5052171328a3f708e98357e10 (diff) | |
download | lwn-ad1ac5012c2beccc9de4d3e2cc1382fd250e5540.tar.gz lwn-ad1ac5012c2beccc9de4d3e2cc1382fd250e5540.zip |
btrfs: move btrfs_map_token to accessors
This is specific to the item-accessor code, move it out of ctree.h into
accessor.h/.c and then update the users to include the new header file.
This un-inlines btrfs_init_map_token, however this is only called once
per function so it's not critical to be inlined. This also saves 904
bytes of code on a release build.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/accessors.h')
-rw-r--r-- | fs/btrfs/accessors.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/btrfs/accessors.h b/fs/btrfs/accessors.h new file mode 100644 index 000000000000..a47b0f9d30ca --- /dev/null +++ b/fs/btrfs/accessors.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef BTRFS_ACCESSORS_H +#define BTRFS_ACCESSORS_H + +struct btrfs_map_token { + struct extent_buffer *eb; + char *kaddr; + unsigned long offset; +}; + +void btrfs_init_map_token(struct btrfs_map_token *token, struct extent_buffer *eb); + +#endif |