[nacked] ocfs2-use-sysfs_emit-instead-of-scnprintf.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: ocfs2: use sysfs_emit() instead of scnprintf()
has been removed from the -mm tree.  Its filename was
     ocfs2-use-sysfs_emit-instead-of-scnprintf.patch

This patch was dropped because it was nacked

------------------------------------------------------
From: XieLudan <xie.ludan@xxxxxxxxxx>
Subject: ocfs2: use sysfs_emit() instead of scnprintf()
Date: Sat, 15 Mar 2025 14:16:40 +0800 (CST)

Follow the advice in Documentation/filesystems/sysfs.rst: show() should
only use sysfs_emit() or sysfs_emit_at() when formatting the value to be
returned to user space.

Link: https://lkml.kernel.org/r/20250315141640564lv7R0CwIRPsmittXXjLbB@xxxxxxxxxx
Signed-off-by: XieLudan <xie.ludan@xxxxxxxxxx>
Cc: Mark Fasheh <mark@xxxxxxxxxx>
Cc: Joel Becker <jlbec@xxxxxxxxxxxx>
Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
Cc: Joseph Qi <jiangqi903@xxxxxxxxx>
Cc: Changwei Ge <gechangwei@xxxxxxx>
Cc: Jun Piao <piaojun@xxxxxxxxxx>
Cc: Jiri Slaby <jirislaby@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/ocfs2/cluster/heartbeat.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/fs/ocfs2/cluster/heartbeat.c~ocfs2-use-sysfs_emit-instead-of-scnprintf
+++ a/fs/ocfs2/cluster/heartbeat.c
@@ -1308,7 +1308,7 @@ static int o2hb_debug_open(struct inode
 
 	case O2HB_DB_TYPE_REGION_NUMBER:
 		reg = (struct o2hb_region *)db->db_data;
-		out += scnprintf(buf + out, PAGE_SIZE - out, "%d\n",
+		out += sysfs_emit(buf + out, "%d\n",
 				reg->hr_region_num);
 		goto done;
 
@@ -1318,12 +1318,12 @@ static int o2hb_debug_open(struct inode
 		/* If 0, it has never been set before */
 		if (lts)
 			lts = jiffies_to_msecs(jiffies - lts);
-		out += scnprintf(buf + out, PAGE_SIZE - out, "%lu\n", lts);
+		out += sysfs_emit(buf + out, "%lu\n", lts);
 		goto done;
 
 	case O2HB_DB_TYPE_REGION_PINNED:
 		reg = (struct o2hb_region *)db->db_data;
-		out += scnprintf(buf + out, PAGE_SIZE - out, "%u\n",
+		out += sysfs_emit(buf + out, "%u\n",
 				!!reg->hr_item_pinned);
 		goto done;
 
@@ -1332,8 +1332,8 @@ static int o2hb_debug_open(struct inode
 	}
 
 	while ((i = find_next_bit(map, db->db_len, i + 1)) < db->db_len)
-		out += scnprintf(buf + out, PAGE_SIZE - out, "%d ", i);
-	out += scnprintf(buf + out, PAGE_SIZE - out, "\n");
+		out += sysfs_emit(buf + out, "%d ", i);
+	out += sysfs_emit(buf + out, "\n");
 
 done:
 	i_size_write(inode, out);
_

Patches currently in -mm which might be from xie.ludan@xxxxxxxxxx are






[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux