]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ocfs2: avoid extra calls to strlen() after ocfs2_sprintf_system_inode_name()
authorDmitry Antipov <dmantipov@yandex.ru>
Wed, 17 Sep 2025 06:02:29 +0000 (09:02 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 23 Sep 2025 03:11:00 +0000 (20:11 -0700)
commit3437819c5e7a855b344030bfe15bbd513c28388f
tree6d4b7410fe10d828c623fd551ce23e281d252ba9
parenta15f37a40145c986cdf289a4b88390f35efdecc4
ocfs2: avoid extra calls to strlen() after ocfs2_sprintf_system_inode_name()

Since 'ocfs2_sprintf_system_inode_name()' uses 'snprintf()' and returns
the number of characters emitted, callers of the former are better to use
that return value instead of an explicit calls to 'strlen()'.

Link: https://lkml.kernel.org/r/20250917060229.1854335-1-dmantipov@yandex.ru
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/ioctl.c
fs/ocfs2/move_extents.c
fs/ocfs2/sysfile.c