]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gfs2/sysfs: Replace sprintf/snprintf with sysfs_emit
authorUtkarsh Singh <utkarsh.singh.em@gmail.com>
Mon, 22 Sep 2025 17:52:22 +0000 (23:22 +0530)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 31 Oct 2025 21:00:42 +0000 (21:00 +0000)
commit02c03021e2fced59b3b5b200fdd00018725d4ee2
tree346649bc7a3b872c1cc3e5b3fc476b6b4a2db84c
parentdcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa
gfs2/sysfs: Replace sprintf/snprintf with sysfs_emit

Documentation/filesystems/sysfs.rst mentions that show() should only
use sysfs_emit() or sysfs_emit_at() when formatting values returned
to user space. This patch updates the GFS2 sysfs interface accordingly.

It replaces uses of sprintf() and snprintf() in all *_show() functions
with sysfs_emit() to align with current kernel sysfs API best practices.
It also updates the TUNE_ATTR_2 macro to use sysfs_emit() instead of
snprintf().

Signed-off-by: Utkarsh Singh <utkarsh.singh.em@gmail.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/sys.c