Skip to content

Commit 928c6fb

Browse files
NeilBrownJ. Bruce Fields
authored andcommitted
NFSD: fix nfsd_minorversion(.., NFSD_AVAIL)
Current code will return 1 if the version is supported, and -1 if it isn't. This is confusing and inconsistent with the one place where this is used. So change to return 1 if it is supported, and zero if not. i.e. an error is never returned. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
1 parent abcb4da commit 928c6fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/nfsd/nfssvc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ nfsd_adjust_nfsd_versions4(void)
167167

168168
int nfsd_minorversion(u32 minorversion, enum vers_op change)
169169
{
170-
if (minorversion > NFSD_SUPPORTED_MINOR_VERSION)
170+
if (minorversion > NFSD_SUPPORTED_MINOR_VERSION &&
171+
change != NFSD_AVAIL)
171172
return -1;
172173
switch(change) {
173174
case NFSD_SET:

0 commit comments

Comments
 (0)