]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: refactor allocation size calculation in alloc_btrfs_io_context()
authorMehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Tue, 30 Sep 2025 10:03:44 +0000 (11:03 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 20:37:36 +0000 (21:37 +0100)
commit2346b966c66a7b9cfef948939ae0526bebb4bef7
tree38330784a261e7ec1b526b52df537512f4aa1ba3
parentaebe2bb0b861795cd832473b7257c6cc1cd086d0
btrfs: refactor allocation size calculation in alloc_btrfs_io_context()

Use struct_size() to replace the open-coded calculation, remove the
comment as use of the helper is self explanatory.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c