Message ID | 20190501003535.23426-1-jencce.kernel@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [resend] vfs: return EINVAL instead of ENOENT when missing source | expand |
On Wed, May 01, 2019 at 08:35:35AM +0800, Murphy Zhou wrote: > From: Xiong Zhou <jencce.kernel@gmail.com> > > mount(2) with a NULL source device would return ENOENT instead of EINVAL > after this commit: See ee948837d7fa in vfs.git#fixes...
On Wed, May 1, 2019 at 9:03 AM Al Viro <viro@zeniv.linux.org.uk> wrote: > > On Wed, May 01, 2019 at 08:35:35AM +0800, Murphy Zhou wrote: > > From: Xiong Zhou <jencce.kernel@gmail.com> > > > > mount(2) with a NULL source device would return ENOENT instead of EINVAL > > after this commit: > > See ee948837d7fa in vfs.git#fixes... Got it. Thanks!
diff --git a/fs/super.c b/fs/super.c index 583a0124bc39..48e51f13a4ba 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1469,7 +1469,7 @@ int vfs_get_tree(struct fs_context *fc) if (fc->fs_type->fs_flags & FS_REQUIRES_DEV && !fc->source) { errorf(fc, "Filesystem requires source device"); - return -ENOENT; + return -EINVAL; } if (fc->root)