]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: sysfs: convert scnprintf and snprintf to sysfs_emit
authorAnand Jain <anand.jain@oracle.com>
Tue, 19 Oct 2021 00:22:09 +0000 (08:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 12:28:48 +0000 (13:28 +0100)
commit0efdc0606fc85983d839607bd18e8b1869fb7831
tree9d0c36021563473942e4bbac6a6013fbd0481949
parent526ff5b27f090fb15040471f892cd2c9899ce314
btrfs: sysfs: convert scnprintf and snprintf to sysfs_emit

[ Upstream commit 020e5277583dc26d7a5322ff2d334c764ac1faa8 ]

Commit 2efc459d06f1 ("sysfs: Add sysfs_emit and sysfs_emit_at to format
sysfs out") merged in 5.10 introduced two new functions sysfs_emit() and
sysfs_emit_at() which are aware of the PAGE_SIZE limit of the output
buffer.

Use the above two new functions instead of scnprintf() and snprintf()
in various sysfs show().

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Stable-dep-of: fca432e73db2 ("btrfs: sysfs: fix direct super block member reads")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/sysfs.c