summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2013-10-21 09:52:19 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-10-28 14:35:07 -0400
commit1966903f8e28b31ff82de2e2180f0c066399288d (patch)
tree8bd9273ff1c7550e157a65e5114f9150692b31fe /fs/nfs
parent57acc40d73407159727b3a1456f0a498133831ba (diff)
downloadop-kernel-dev-1966903f8e28b31ff82de2e2180f0c066399288d.zip
op-kernel-dev-1966903f8e28b31ff82de2e2180f0c066399288d.tar.gz
nfs: fix handling of invalid mount options in nfs_remount
nfs_parse_mount_options returns 0 on error, not -errno. Reported-by: Karel Zak <kzak@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 137572b..3f5a7a8 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;
/*
OpenPOWER on IntegriCloud