Skip to content

Commit

Permalink
NFS: Remove v3 not compiled check from validate_mount_data()
Browse files Browse the repository at this point in the history
This check is already performed by the module loading code - if the
module can't be found then -EPROTONOSUPPORT will be returned.  Let's
handle v3 this way, too.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
amschuma-ntap authored and trondmypd committed Sep 12, 2014
1 parent 00a36a1 commit f08460d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2065,11 +2065,6 @@ static int nfs23_validate_mount_data(void *options,
return NFS_TEXT_DATA;
}

#if !IS_ENABLED(CONFIG_NFS_V3)
if (args->version == 3)
goto out_v3_not_compiled;
#endif /* !CONFIG_NFS_V3 */

return 0;

out_no_data:
Expand All @@ -2085,12 +2080,6 @@ static int nfs23_validate_mount_data(void *options,
dfprintk(MOUNT, "NFS: nfs_mount_data version supports only AUTH_SYS\n");
return -EINVAL;

#if !IS_ENABLED(CONFIG_NFS_V3)
out_v3_not_compiled:
dfprintk(MOUNT, "NFS: NFSv3 is not compiled into kernel\n");
return -EPROTONOSUPPORT;
#endif /* !CONFIG_NFS_V3 */

out_nomem:
dfprintk(MOUNT, "NFS: not enough memory to handle mount options\n");
return -ENOMEM;
Expand Down

0 comments on commit f08460d

Please sign in to comment.