nfs: fix handling of invalid mount options in nfs_remount
Subsystems (2)
PATCH 1/1 nfs: fix handling of invalid mount options in nfs_remount
nfs_parse_mount_options returns 0 on error, not -errno.
Reported-by Karel Zak <[email protected]>
Signed-off-by Jeff Layton <[email protected]>
--- fs/nfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/nfs/super.c +2 -2
@@ -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;/*
Signature · 1 line
1.8.3.1