mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
NFSD: fix compile warning without CONFIG_NFSD_V3
Without CONFIG_NFSD_V3, compile will get warning as,
fs/nfsd/nfssvc.c: In function 'nfsd_svc':
>> fs/nfsd/nfssvc.c:246:60: warning: array subscript is above array bounds [-Warray-bounds]
return (nfsd_versions[2] != NULL) || (nfsd_versions[3] != NULL);
^
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Kinglong Mee <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
parent
8ef667140c
commit
ff88825fbb
1 changed files with 4 additions and 0 deletions
|
|
@ -243,7 +243,11 @@ static void nfsd_shutdown_generic(void)
|
|||
|
||||
static bool nfsd_needs_lockd(void)
|
||||
{
|
||||
#if defined(CONFIG_NFSD_V3)
|
||||
return (nfsd_versions[2] != NULL) || (nfsd_versions[3] != NULL);
|
||||
#else
|
||||
return (nfsd_versions[2] != NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int nfsd_startup_net(int nrservs, struct net *net)
|
||||
|
|
|
|||
Loading…
Reference in a new issue