]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:08:07 +0000 (19:08 +0200)
commitbb48eb5b1bf84b2b1bbf83af86eb548856b7e705
tree1f29590d465b11ec30a84a1da07d720257aa2db1
parent456388f116dcff92d2e1b92a07b0d6c378b22f52
btrfs: sysfs: convert scnprintf and snprintf to sysfs_emit

Commit a776a25b903a ("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>
fs/btrfs/sysfs.c