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)
commit2e0cdaa0288bbe3d6a05937bc7b61aa9da0cb2bf
tree9747cea97640d4c0141a58d9f1dae37efe5521ad
parentad5d6e9148b6774625149dc4dece0e54f3e7f7c9
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