]> Pileus Git - ~andy/linux/commit
NFSD: fix compile warning without CONFIG_NFSD_V3
authorKinglong Mee <kinglongmee@gmail.com>
Mon, 6 Jan 2014 03:28:41 +0000 (11:28 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 6 Jan 2014 17:23:31 +0000 (12:23 -0500)
commitff88825fbb9f5a503164bb5ad4a8c65dabfa13e0
tree11a964af266c0357a917f95e3710bb74656033a0
parent8ef667140c52e9b88934664954217f28559c75d6
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 <fengguang.wu@intel.com>
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfssvc.c