[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251204040919.2522790-1-vivek.balachandhar@gmail.com>
Date: Thu, 4 Dec 2025 04:09:19 +0000
From: Vivek BalachandharTN <vivek.balachandhar@...il.com>
To: brauner@...nel.org
Cc: penguin-kernel@...ove.SAKURA.ne.jp,
chentaoo@...iglobal.com,
linux-kernel@...r.kernel.org,
vivek.balachandhar@...il.com
Subject: [PATCH] minix: return -EIO when superblock read fails
When minix_fill_super() fails to read the on-disk superblock, it prints
"MINIX-fs: unable to read superblock" but still returns -EINVAL. This
is misleading for callers, since the failure is due to an I/O error
rather than an invalid superblock format or mount option.
Return -EIO in this case so that the errno better reflects the actual
error condition and allows userspace to distinguish I/O failures from
format or parameter errors.
Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@...il.com>
---
fs/minix/inode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index 32db676127a9..2b2b64a31724 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -365,6 +365,7 @@ static int minix_fill_super(struct super_block *s, struct fs_context *fc)
goto out;
out_bad_sb:
+ ret = -EIO;
printk("MINIX-fs: unable to read superblock\n");
out:
s->s_fs_info = NULL;
--
2.34.1
Powered by blists - more mailing lists