Coverity CID 734: Define NFS_TEST_HEAVY for testing nfsds, and use this to
ifdef out dead code. XXX: Why is this turned on by default?
This commit is contained in:
parent
4ea21306a7
commit
0b55b29a78
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_socket.c,v 1.126 2006/03/01 21:31:00 rpaulo Exp $ */
|
||||
/* $NetBSD: nfs_socket.c,v 1.127 2006/04/15 01:57:36 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993, 1995
|
||||
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.126 2006/03/01 21:31:00 rpaulo Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.127 2006/04/15 01:57:36 christos Exp $");
|
||||
|
||||
#include "fs_nfs.h"
|
||||
#include "opt_nfs.h"
|
||||
|
@ -2225,7 +2225,8 @@ nfsrv_rcv(so, arg, waitflag)
|
|||
}
|
||||
|
||||
KASSERT(so == slp->ns_so);
|
||||
#if 1
|
||||
#define NFS_TEST_HEAVY
|
||||
#if NFS_TEST_HEAVY
|
||||
/*
|
||||
* Define this to test for nfsds handling this under heavy load.
|
||||
*
|
||||
|
@ -2240,6 +2241,7 @@ nfsrv_rcv(so, arg, waitflag)
|
|||
slp->ns_flag &= ~SLP_NEEDQ;
|
||||
simple_unlock(&slp->ns_lock);
|
||||
if (so->so_type == SOCK_STREAM) {
|
||||
#ifndef NFS_TEST_HEAVY
|
||||
/*
|
||||
* If there are already records on the queue, defer soreceive()
|
||||
* to an nfsd so that there is feedback to the TCP layer that
|
||||
|
@ -2249,6 +2251,7 @@ nfsrv_rcv(so, arg, waitflag)
|
|||
setflags |= SLP_NEEDQ;
|
||||
goto dorecs;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Do soreceive().
|
||||
|
|
Loading…
Reference in New Issue