diff options
author | NeilBrown <neilb@suse.com> | 2017-03-10 03:36:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-20 12:01:29 +0300 |
commit | 537546e6e440a2f5a0636880fc6d4a497d65016a (patch) | |
tree | e0ae2a0c61e9e78a2574cabd8e653bd3aaaca3ef /fs/nfsd/nfssvc.c | |
parent | f73422f3a6e833ec44f0f37211781eab50223f71 (diff) | |
download | linux-537546e6e440a2f5a0636880fc6d4a497d65016a.tar.xz |
NFSD: fix nfsd_minorversion(.., NFSD_AVAIL)
[ Upstream commit 928c6fb3a9bfd6c5b287aa3465226add551c13c0 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 a89654bd08c5..4dbd42384655 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -150,7 +150,8 @@ int nfsd_vers(int vers, enum vers_op change) 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: |