summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-08-22 04:06:44 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2024-08-22 08:07:23 +0200
commit06f67437ab356e3140f51aea272d33ce28421f66 (patch)
tree5a824469eb6f65268cb579dabfc82f97bfd667ec
parentbcachefs: Fix missing validation in bch2_sb_journal_v2_validate() (diff)
downloadlinux-06f67437ab356e3140f51aea272d33ce28421f66.tar.xz
linux-06f67437ab356e3140f51aea272d33ce28421f66.zip
fs/super.c: improve get_tree() error message
seeing an odd bug where we fail to correctly return an error from .get_tree(): https://syzkaller.appspot.com/bug?extid=c0360e8367d6d8d04a66 we need to be able to distinguish between accidently returning a positive error (as implied by the log) and no error. Cc: David Howells <dhowells@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/super.c b/fs/super.c
index 38d72a3cf6fc..b7913b55debc 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1802,8 +1802,8 @@ int vfs_get_tree(struct fs_context *fc)
return error;
if (!fc->root) {
- pr_err("Filesystem %s get_tree() didn't set fc->root\n",
- fc->fs_type->name);
+ pr_err("Filesystem %s get_tree() didn't set fc->root, returned %i\n",
+ fc->fs_type->name, error);
/* We don't know what the locking state of the superblock is -
* if there is a superblock.
*/