From: Filipe Manana Date: Tue, 11 Oct 2022 12:16:58 +0000 (+0100) Subject: btrfs: drop redundant bflags initialization when allocating extent buffer X-Git-Tag: v6.6.7~3585^2~253 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=206c1d32f381ee91ba849a7dcb28728e8c3721b6;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: David Sterba --- diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 56a9f59..3192f09 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -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);