]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
fs/super.c: improve get_tree() error message
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 22 Aug 2024 02:06:44 +0000 (22:06 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 22 Aug 2024 06:07:23 +0000 (02:07 -0400)
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>
fs/super.c

index 38d72a3cf6fcf88560f13faae8c2452de1fbad8c..b7913b55debc1fc489cae188d438c62d4da87504 100644 (file)
@@ -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.
                 */