diff options
author | David Sterba <dsterba@suse.com> | 2020-04-29 16:29:53 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-05-25 12:25:32 +0300 |
commit | 60d48e2e4575dd848a43ceeda6cbc38a87427330 (patch) | |
tree | 585735a45f95d176ee1b537e4ba3f9900a2f4ba8 /fs | |
parent | cc4c13d55cba8a0b81bc18243eabc57be1aa44d2 (diff) | |
download | linux-60d48e2e4575dd848a43ceeda6cbc38a87427330.tar.xz |
btrfs: don't use set/get token for single assignment in overwrite_item
The set/get token is supposed to cache the last page that was accessed
so it speeds up subsequential access to the eb. It does not make sense
to use that for just one change, which is the case of inode size in
overwrite_item.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/tree-log.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index ee1c627bd618..60febf2082ee 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -505,13 +505,8 @@ insert: */ if (S_ISREG(btrfs_inode_mode(eb, src_item)) && S_ISREG(btrfs_inode_mode(dst_eb, dst_item)) && - ino_size != 0) { - struct btrfs_map_token token; - - btrfs_init_map_token(&token, dst_eb); - btrfs_set_token_inode_size(&token, dst_item, - ino_size); - } + ino_size != 0) + btrfs_set_inode_size(dst_eb, dst_item, ino_size); goto no_copy; } |