Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

NFSD: Remove a never-true comparison

fh_size is an unsigned int, thus it can never be less than 0.

Fixes: d8b26071e65e ("NFSD: simplify struct nfsfh")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

+1 -1
+1 -1
fs/nfsd/nfsfh.c
··· 766 766 struct knfsd_fh *fh = &fhp->fh_handle; 767 767 static char buf[2+1+1+64*3+1]; 768 768 769 - if (fh->fh_size < 0 || fh->fh_size> 64) 769 + if (fh->fh_size > 64) 770 770 return "bad-fh"; 771 771 sprintf(buf, "%d: %*ph", fh->fh_size, fh->fh_size, fh->fh_raw); 772 772 return buf;