diff mbox series

[12/13] xfs: convert xfs_errortag attrs to use ->seq_show

Message ID 20210913054121.616001-13-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/13] seq_file: mark seq_get_buf as deprecated | expand

Commit Message

Christoph Hellwig Sept. 13, 2021, 5:41 a.m. UTC
Trivial conversion to the seq_file based sysfs attributes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_error.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
index 81c445e9489bd..143a1e0b12ffe 100644
--- a/fs/xfs/xfs_error.c
+++ b/fs/xfs/xfs_error.c
@@ -104,22 +104,22 @@  xfs_errortag_attr_store(
 	return count;
 }
 
-STATIC ssize_t
-xfs_errortag_attr_show(
+STATIC int
+xfs_errortag_attr_seq_show(
 	struct kobject		*kobject,
 	struct attribute	*attr,
-	char			*buf)
+	struct seq_file		*sf)
 {
 	struct xfs_mount	*mp = to_mp(kobject);
 	struct xfs_errortag_attr *xfs_attr = to_attr(attr);
 
-	return snprintf(buf, PAGE_SIZE, "%u\n",
-			xfs_errortag_get(mp, xfs_attr->tag));
+	seq_printf(sf, "%u\n", xfs_errortag_get(mp, xfs_attr->tag));
+	return 0;
 }
 
 static const struct sysfs_ops xfs_errortag_sysfs_ops = {
-	.show = xfs_errortag_attr_show,
-	.store = xfs_errortag_attr_store,
+	.seq_show	= xfs_errortag_attr_seq_show,
+	.store		= xfs_errortag_attr_store,
 };
 
 #define XFS_ERRORTAG_ATTR_RW(_name, _tag) \