aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tests/extent-io-tests.c
diff options
context:
space:
mode:
authorDmitry Antipov <[email protected]>2025-06-27 08:51:17 +0000
committerDavid Sterba <[email protected]>2025-07-21 21:58:05 +0000
commit2fb5e56f524f7c0ca3ebda0069f8dd83b90876e5 (patch)
treed7f5ae17f49a54e4a7464092dfea181f25452cc1 /fs/btrfs/tests/extent-io-tests.c
parentbtrfs: qgroup: avoid memory allocation if qgroups are not enabled (diff)
downloadkernel-2fb5e56f524f7c0ca3ebda0069f8dd83b90876e5.tar.gz
kernel-2fb5e56f524f7c0ca3ebda0069f8dd83b90876e5.zip
btrfs: send: avoid extra calls to strlen() in gen_unique_name()
Since 'snprintf()' returns the number of characters which would be emitted and output truncation is handled by 'ASSERT()', it should be safe to use that return value instead of the subsequent calls to 'strlen()' in 'gen_unique_name()'. This also reduces the module's text size. Before: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1897006 161571 16136 2074713 1fa859 fs/btrfs/btrfs.ko After: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1896848 161571 16136 2074555 1fa7bb fs/btrfs/btrfs.ko Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Dmitry Antipov <[email protected]> Reviewed-by: Filipe Manana <[email protected]> Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/tests/extent-io-tests.c')
0 files changed, 0 insertions, 0 deletions