Skip to content

Commit 60d48e2

Browse files
committed
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 <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent cc4c13d commit 60d48e2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

fs/btrfs/tree-log.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -505,13 +505,8 @@ static noinline int overwrite_item(struct btrfs_trans_handle *trans,
505505
*/
506506
if (S_ISREG(btrfs_inode_mode(eb, src_item)) &&
507507
S_ISREG(btrfs_inode_mode(dst_eb, dst_item)) &&
508-
ino_size != 0) {
509-
struct btrfs_map_token token;
510-
511-
btrfs_init_map_token(&token, dst_eb);
512-
btrfs_set_token_inode_size(&token, dst_item,
513-
ino_size);
514-
}
508+
ino_size != 0)
509+
btrfs_set_inode_size(dst_eb, dst_item, ino_size);
515510
goto no_copy;
516511
}
517512

0 commit comments

Comments
 (0)