提交 60d48e2e 编写于 作者: D David Sterba

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: NJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 cc4c13d5
......@@ -505,13 +505,8 @@ static noinline int overwrite_item(struct btrfs_trans_handle *trans,
*/
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册