Skip to content

Commit

Permalink
nfs: fix handling of invalid mount options in nfs_remount
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Layton authored and Trond Myklebust committed Oct 28, 2013
1 parent 57acc40 commit 1966903
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 1966903

Please sign in to comment.