ovl: return EINVAL instead of EIO in case of mismatched user_ns

The EIO was used to signal an internal error (commit 9efb069de4 ("ovl:
add warning on user_ns mismatch")), which is no longer the case.

Fixes: 63981fc786 ("ovl: don't warn when the mount is completed from another user namespace")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Link: https://patch.msgid.link/20260825152330.850645-1-mszeredi@redhat.com
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Miklos Szeredi 2026-08-25 17:23:29 +02:00 committed by Christian Brauner
parent 5a88f78df7
commit a518e63c37
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2

View File

@ -1543,7 +1543,7 @@ int ovl_fill_super(struct super_block *sb, struct fs_context *fc)
struct ovl_fs *ofs = sb->s_fs_info;
int err;
err = -EIO;
err = -EINVAL;
/* The fscontext fd may have been passed to another user namespace. */
if (fc->user_ns != current_user_ns())
goto out_err;