]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove unnecessary extent map initializations
authorFilipe Manana <fdmanana@suse.com>
Mon, 19 Sep 2022 14:06:35 +0000 (15:06 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 29 Sep 2022 15:08:30 +0000 (17:08 +0200)
commitaad1dab8b720cd8f528e15557d3fe9c71b04cc02
tree9747cea97640d4c0141a58d9f1dae37efe5521ad
parent012ef25a66517af5ea234a08f2edbf5ad8bf6f72
btrfs: remove unnecessary extent map initializations

When allocating an extent map, we use kmem_cache_zalloc() which guarantees
the returned memory is initialized to zeroes, therefore it's pointless
to initialize the generation and flags of the extent map to zero again.

Remove those initializations, as they are pointless and slightly increase
the object text size.

Before removing them:

   $ size fs/btrfs/extent_map.o
      text    data     bss     dec     hex filename
      9241     274      24    9539    2543 fs/btrfs/extent_map.o

After removing them:

   $ size fs/btrfs/extent_map.o
      text    data     bss     dec     hex filename
      9209     274      24    9507    2523 fs/btrfs/extent_map.o

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_map.c