From: Jeff Layton Date: Mon, 21 Oct 2013 13:52:19 +0000 (-0400) Subject: nfs: fix handling of invalid mount options in nfs_remount X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1966903f8e28b31ff82de2e2180f0c066399288d;p=openwrt%2Fstaging%2Fblogic.git nfs: fix handling of invalid mount options in nfs_remount nfs_parse_mount_options returns 0 on error, not -errno. Reported-by: Karel Zak Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 137572bb7037..3f5a7a85c9c2 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -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; /*