diff options
author | NeilBrown <neilb@suse.com> | 2017-03-10 11:36:39 +1100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-03-10 17:04:50 -0500 |
commit | 928c6fb3a9bfd6c5b287aa3465226add551c13c0 (patch) | |
tree | 6403d69801b516ccd8533a894c709220a17e706b /fs/nfsd/nfssvc.c | |
parent | abcb4dacb098a1baca746406a8775e9930f47f3f (diff) | |
download | op-kernel-dev-928c6fb3a9bfd6c5b287aa3465226add551c13c0.zip op-kernel-dev-928c6fb3a9bfd6c5b287aa3465226add551c13c0.tar.gz |
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>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 786a4a2..892137b 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -167,7 +167,8 @@ nfsd_adjust_nfsd_versions4(void) int nfsd_minorversion(u32 minorversion, enum vers_op change) { - if (minorversion > NFSD_SUPPORTED_MINOR_VERSION) + if (minorversion > NFSD_SUPPORTED_MINOR_VERSION && + change != NFSD_AVAIL) return -1; switch(change) { case NFSD_SET: |