TAILQ_HEAD(nfsrv_reqcache_lru, nfsrvcache) nfsrv_reqcache_lruhead;
u_long nfsrv_reqcache_hash;
TAILQ_HEAD(nfsrv_reqcache_lru, nfsrvcache) nfsrv_reqcache_lruhead;
u_long nfsrv_reqcache_hash;
-lck_grp_t *nfsrv_reqcache_lck_grp;
-lck_mtx_t *nfsrv_reqcache_mutex;
+static LCK_GRP_DECLARE(nfsrv_reqcache_lck_grp, "nfsrv_reqcache");
+LCK_MTX_DECLARE(nfsrv_reqcache_mutex, &nfsrv_reqcache_lck_grp);
/* init nfs server request cache hash table */
nfsrv_reqcache_hashtbl = hashinit(nfsrv_reqcache_size, M_NFSD, &nfsrv_reqcache_hash);
TAILQ_INIT(&nfsrv_reqcache_lruhead);
/* init nfs server request cache hash table */
nfsrv_reqcache_hashtbl = hashinit(nfsrv_reqcache_size, M_NFSD, &nfsrv_reqcache_hash);
TAILQ_INIT(&nfsrv_reqcache_lruhead);
netaddr_match(rp->rc_family, &rp->rc_haddr, nd->nd_nam)) {
if ((rp->rc_flag & RC_LOCKED) != 0) {
rp->rc_flag |= RC_WANTED;
netaddr_match(rp->rc_family, &rp->rc_haddr, nd->nd_nam)) {
if ((rp->rc_flag & RC_LOCKED) != 0) {
rp->rc_flag |= RC_WANTED;
- msleep(rp, nfsrv_reqcache_mutex, PZERO - 1, "nfsrc", NULL);
+ msleep(rp, &nfsrv_reqcache_mutex, PZERO - 1, "nfsrc", NULL);
- msleep(rp, nfsrv_reqcache_mutex, PZERO - 1, "nfsrc", NULL);
+ msleep(rp, &nfsrv_reqcache_mutex, PZERO - 1, "nfsrc", NULL);
netaddr_match(rp->rc_family, &rp->rc_haddr, nd->nd_nam)) {
if ((rp->rc_flag & RC_LOCKED) != 0) {
rp->rc_flag |= RC_WANTED;
netaddr_match(rp->rc_family, &rp->rc_haddr, nd->nd_nam)) {
if ((rp->rc_flag & RC_LOCKED) != 0) {
rp->rc_flag |= RC_WANTED;
- msleep(rp, nfsrv_reqcache_mutex, PZERO - 1, "nfsrc", NULL);
+ msleep(rp, &nfsrv_reqcache_mutex, PZERO - 1, "nfsrc", NULL);
for (rp = nfsrv_reqcache_lruhead.tqh_first; rp != 0; rp = nextrp) {
nextrp = rp->rc_lru.tqe_next;
LIST_REMOVE(rp, rc_hash);
for (rp = nfsrv_reqcache_lruhead.tqh_first; rp != 0; rp = nextrp) {
nextrp = rp->rc_lru.tqe_next;
LIST_REMOVE(rp, rc_hash);
}
nfsrv_reqcache_count = 0;
FREE(nfsrv_reqcache_hashtbl, M_TEMP);
}
nfsrv_reqcache_count = 0;
FREE(nfsrv_reqcache_hashtbl, M_TEMP);