mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
btrfs: drop redundant bflags initialization when allocating extent buffer
When allocating an extent buffer, at __alloc_extent_buffer(), there's no point in explicitly assigning zero to the bflags field of the new extent buffer because we allocated it with kmem_cache_zalloc(). So just remove the redundant initialization, it saves one mov instruction in the generated assembly code for x86_64 ("movq $0x0,0x10(%rax)"). Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
b98c6cd59e
commit
206c1d32f3
@ -4266,7 +4266,6 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start,
|
||||
eb->start = start;
|
||||
eb->len = len;
|
||||
eb->fs_info = fs_info;
|
||||
eb->bflags = 0;
|
||||
init_rwsem(&eb->lock);
|
||||
|
||||
btrfs_leak_debug_add_eb(eb);
|
||||
|
Loading…
Reference in New Issue
Block a user