diff options
author | David Sterba <dsterba@suse.com> | 2020-04-29 02:13:57 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-05-25 11:25:31 +0200 |
commit | 4dae666a6286ce5d9f4890f8b88af646473686f0 (patch) | |
tree | 394c63413db876b11f2bf69d090c104695c7c1af /fs/btrfs | |
parent | f2998ebd32e25e432e3d0058552e4777c5aba75a (diff) | |
download | linux-4dae666a6286ce5d9f4890f8b88af646473686f0.tar.bz2 |
btrfs: use the token::eb for all set/get helpers
The token stores a copy of the extent buffer pointer but does not make
any use of it besides sanity checks. We can use it and drop the eb
parameter from several functions, this patch only switches the use
inside the set/get helpers.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/struct-funcs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/struct-funcs.c b/fs/btrfs/struct-funcs.c index 73f7987143df..7928d310f698 100644 --- a/fs/btrfs/struct-funcs.c +++ b/fs/btrfs/struct-funcs.c @@ -62,12 +62,12 @@ u##bits btrfs_get_token_##bits(const struct extent_buffer *eb, \ res = get_unaligned_le##bits(p + off); \ return res; \ } \ - err = map_private_extent_buffer(eb, offset, size, \ + err = map_private_extent_buffer(token->eb, offset, size, \ &kaddr, &map_start, &map_len); \ if (err) { \ __le##bits leres; \ \ - read_extent_buffer(eb, &leres, offset, size); \ + read_extent_buffer(token->eb, &leres, offset, size); \ return le##bits##_to_cpu(leres); \ } \ p = kaddr + part_offset - map_start; \ @@ -125,13 +125,13 @@ void btrfs_set_token_##bits(struct extent_buffer *eb, \ put_unaligned_le##bits(val, p + off); \ return; \ } \ - err = map_private_extent_buffer(eb, offset, size, \ + err = map_private_extent_buffer(token->eb, offset, size, \ &kaddr, &map_start, &map_len); \ if (err) { \ __le##bits val2; \ \ val2 = cpu_to_le##bits(val); \ - write_extent_buffer(eb, &val2, offset, size); \ + write_extent_buffer(token->eb, &val2, offset, size); \ return; \ } \ p = kaddr + part_offset - map_start; \ |