Skip to contentSkip to conversation

Split patches sent earlier

PATCH New Dominique Martinet 1 participant 4 messages Sep 26, 2025 9P file system

lore
Share & tools
lore

Dominique Martinet

author maintainer
#0 lore raw

cover Split patches sent earlier

This was a pretty simple patch overall but "bullet point" commits are not great for later debugging, so just split this commit in 3:
https://lkml.kernel.org/r/[email protected]

Randall, I kept you as author, so please comment if you have anything to say about commit messages or anything else, and I'll pick these up and push to Linus in a couple of weeks.

---
Randall P. Embry (3):
9p: clean up comment typos
9p: fix /sys/fs/9p/caches overwriting itself 9p: sysfs_init: don't hardcode error to ENOMEM

 fs/9p/v9fs.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250926-v9fs_misc-36320aef88d9

Best regards,

Signature · 1 line
Dominique Martinet <[email protected]>
author maintainer
#1 lore raw

PATCH 1/3 9p: clean up comment typos

From: "Randall P. Embry" <[email protected]>

Fix a few minor typos in comments (e.g. "trasnport" → "transport").

---
 fs/9p/v9fs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
fs/9p/v9fs.c +3 -4
index 77e9c4387c1dfd4de8a54e9b6f676bdf987dbdc9..01e70a464b6039231df272e43b4ebdd3b5afb967 100644
@@ -438,8 +438,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
 		v9ses->flags &= ~V9FS_ACCESS_MASK;
 		v9ses->flags |= V9FS_ACCESS_USER;
 	}
-	/*FIXME !! */
-	/* for legacy mode, fall back to V9FS_ACCESS_ANY */
+	/* FIXME: for legacy mode, fall back to V9FS_ACCESS_ANY */
 	if (!(v9fs_proto_dotu(v9ses) || v9fs_proto_dotl(v9ses)) &&
 		((v9ses->flags&V9FS_ACCESS_MASK) == V9FS_ACCESS_USER)) {
 
@@ -450,7 +449,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
 	if (!v9fs_proto_dotl(v9ses) ||
 		!((v9ses->flags & V9FS_ACCESS_MASK) == V9FS_ACCESS_CLIENT)) {
 		/*
-		 * We support ACL checks on clinet only if the protocol is
+		 * We support ACL checks on client only if the protocol is
 		 * 9P2000.L and access is V9FS_ACCESS_CLIENT.
 		 */
 		v9ses->flags &= ~V9FS_ACL_MASK;
@@ -669,7 +668,7 @@ static int __init init_v9fs(void)
 	int err;
 
 	pr_info("Installing v9fs 9p2000 file system support\n");
-	/* TODO: Setup list of registered trasnport modules */
+	/* TODO: Setup list of registered transport modules */
 
 	err = v9fs_init_inode_cache();
 	if (err < 0) {
Signature · 1 line
2.51.0
author maintainer
#2 lore raw

PATCH 2/3 9p: fix /sys/fs/9p/caches overwriting itself

In reply to Dominique Martinet

From: "Randall P. Embry" <[email protected]>

caches_show() overwrote its buffer on each iteration, so only the last cache tag was visible in sysfs output.

Properly append with snprintf(buf + count, …).

---
 fs/9p/v9fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/9p/v9fs.c +1 -1
index 01e70a464b6039231df272e43b4ebdd3b5afb967..4d289c56578fb15e45d8e94a264977898973cb31 100644
@@ -560,7 +560,7 @@ static ssize_t caches_show(struct kobject *kobj,
 	spin_lock(&v9fs_sessionlist_lock);
 	list_for_each_entry(v9ses, &v9fs_sessionlist, slist) {
 		if (v9ses->cachetag) {
-			n = snprintf(buf, limit, "%s\n", v9ses->cachetag);
+			n = snprintf(buf + count, limit, "%s\n", v9ses->cachetag);
 			if (n < 0) {
 				count = n;
 				break;
Signature · 1 line
2.51.0
author maintainer
#3 lore raw

PATCH 3/3 9p: sysfs_init: don't hardcode error to ENOMEM

In reply to Dominique Martinet

From: "Randall P. Embry" <[email protected]>

v9fs_sysfs_init() always returned -ENOMEM on failure; return the actual sysfs_create_group() error instead.

---
 fs/9p/v9fs.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
fs/9p/v9fs.c +5 -2
index 4d289c56578fb15e45d8e94a264977898973cb31..a020a8f00a1ac074e826a728c5a2b1ef09ec87fd 100644
@@ -596,13 +596,16 @@ static const struct attribute_group v9fs_attr_group = {
 
 static int __init v9fs_sysfs_init(void)
 {
+	int ret;
+
 	v9fs_kobj = kobject_create_and_add("9p", fs_kobj);
 	if (!v9fs_kobj)
 		return -ENOMEM;
 
-	if (sysfs_create_group(v9fs_kobj, &v9fs_attr_group)) {
+	ret = sysfs_create_group(v9fs_kobj, &v9fs_attr_group);
+	if (ret) {
 		kobject_put(v9fs_kobj);
-		return -ENOMEM;
+		return ret;
 	}
 
 	return 0;
Signature · 1 line
2.51.0