提交 1966903f 编写于 作者: J Jeff Layton 提交者: Trond Myklebust

nfs: fix handling of invalid mount options in nfs_remount

nfs_parse_mount_options returns 0 on error, not -errno.
Reported-by: NKarel Zak <kzak@redhat.com>
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 57acc40d
......@@ -2205,8 +2205,8 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
data->nfs_server.addrlen);
/* overwrite those values with any that were specified */
error = nfs_parse_mount_options((char *)options, data);
if (error < 0)
error = -EINVAL;
if (!nfs_parse_mount_options((char *)options, data))
goto out;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册