diff --git a/sys/fs/puffs/puffs_msgif.c b/sys/fs/puffs/puffs_msgif.c index e8fb86a231cc..f0486b411bfa 100644 --- a/sys/fs/puffs/puffs_msgif.c +++ b/sys/fs/puffs/puffs_msgif.c @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_msgif.c,v 1.93 2012/11/05 17:27:38 dholland Exp $ */ +/* $NetBSD: puffs_msgif.c,v 1.94 2013/10/17 21:03:27 christos Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.93 2012/11/05 17:27:38 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.94 2013/10/17 21:03:27 christos Exp $"); #include #include @@ -336,7 +336,6 @@ void puffs_msg_enqueue(struct puffs_mount *pmp, struct puffs_msgpark *park) { struct lwp *l = curlwp; - struct mount *mp; struct puffs_req *preq, *creq; ssize_t delta; @@ -348,7 +347,6 @@ puffs_msg_enqueue(struct puffs_mount *pmp, struct puffs_msgpark *park) park->park_flags &= ~(PARKFLAG_DONE | PARKFLAG_HASERROR); KASSERT((park->park_flags & PARKFLAG_WAITERGONE) == 0); - mp = PMPTOMP(pmp); preq = park->park_preq; #if 1 @@ -1218,7 +1216,6 @@ puffs_userdead(struct puffs_mount *pmp) /* signal waiters on REQUEST TO file server queue */ for (park = TAILQ_FIRST(&pmp->pmp_msg_touser); park; park = park_next) { - uint8_t opclass; mutex_enter(&park->park_mtx); puffs_msgpark_reference(park); @@ -1242,7 +1239,6 @@ puffs_userdead(struct puffs_mount *pmp) puffs_msgpark_release(park); } else { - opclass = park->park_preq->preq_opclass; park->park_preq->preq_rv = ENXIO; if (park->park_flags & PARKFLAG_CALL) { diff --git a/sys/fs/puffs/puffs_node.c b/sys/fs/puffs/puffs_node.c index f1a64c6b209a..3ae585d80bdc 100644 --- a/sys/fs/puffs/puffs_node.c +++ b/sys/fs/puffs/puffs_node.c @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_node.c,v 1.29 2013/03/06 11:40:22 yamt Exp $ */ +/* $NetBSD: puffs_node.c,v 1.30 2013/10/17 21:03:27 christos Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: puffs_node.c,v 1.29 2013/03/06 11:40:22 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_node.c,v 1.30 2013/10/17 21:03:27 christos Exp $"); #include #include @@ -256,10 +256,8 @@ puffs_newnode(struct mount *mp, struct vnode *dvp, struct vnode **vpp, void puffs_putvnode(struct vnode *vp) { - struct puffs_mount *pmp; struct puffs_node *pnode; - pmp = VPTOPUFFSMP(vp); pnode = VPTOPP(vp); #ifdef DIAGNOSTIC diff --git a/sys/fs/puffs/puffs_sys.h b/sys/fs/puffs/puffs_sys.h index cd85c6eb72ec..ec882309d8e0 100644 --- a/sys/fs/puffs/puffs_sys.h +++ b/sys/fs/puffs/puffs_sys.h @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_sys.h,v 1.83 2013/03/06 11:39:37 yamt Exp $ */ +/* $NetBSD: puffs_sys.h,v 1.84 2013/10/17 21:03:27 christos Exp $ */ /* * Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved. @@ -95,7 +95,7 @@ extern int puffsdebug; /* puffs_subr.c */ #define PUFFS_USE_DOTDOTCACHE(pmp) \ ((pmp)->pmp_flags & PUFFS_KFLAG_CACHE_DOTDOT) -#define PUFFS_WCACHEINFO(pmp) 0 +#define PUFFS_WCACHEINFO(pmp) (__USE(pmp), 0) struct puffs_newcookie { puffs_cookie_t pnc_cookie; @@ -338,6 +338,18 @@ do { \ if (park_##a) puffs_msgmem_release(park_##a); \ } while (/*CONSTCOND*/0) +#define PUFFS_MSG_ENQUEUEWAIT_NOERROR(pmp, park) \ +do { \ + puffs_msg_enqueue(pmp, park); \ + puffs_msg_wait(pmp, park); \ +} while (/*CONSTCOND*/0) + +#define PUFFS_MSG_ENQUEUEWAIT2_NOERROR(pmp, park, vp1, vp2) \ +do { \ + puffs_msg_enqueue(pmp, park); \ + puffs_msg_wait2(pmp, park, vp1, vp2); \ +} while (/*CONSTCOND*/0) + #define PUFFS_MSG_ENQUEUEWAIT(pmp, park, var) \ do { \ puffs_msg_enqueue(pmp, park); \ diff --git a/sys/fs/puffs/puffs_vnops.c b/sys/fs/puffs/puffs_vnops.c index 2648b4cfc6f4..619d79af28a6 100644 --- a/sys/fs/puffs/puffs_vnops.c +++ b/sys/fs/puffs/puffs_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.176 2012/11/05 17:27:38 dholland Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.177 2013/10/17 21:03:27 christos Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.176 2012/11/05 17:27:38 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.177 2013/10/17 21:03:27 christos Exp $"); #include #include @@ -1252,15 +1252,13 @@ doinact(struct puffs_mount *pmp, int iaflag) static void callinactive(struct puffs_mount *pmp, puffs_cookie_t ck, int iaflag) { - int error; PUFFS_MSG_VARS(vn, inactive); if (doinact(pmp, iaflag)) { PUFFS_MSG_ALLOC(vn, inactive); puffs_msg_setinfo(park_inactive, PUFFSOP_VN, PUFFS_VN_INACTIVE, ck); - - PUFFS_MSG_ENQUEUEWAIT(pmp, park_inactive, error); + PUFFS_MSG_ENQUEUEWAIT_NOERROR(pmp, park_inactive); PUFFS_MSG_RELEASE(inactive); } } @@ -1278,7 +1276,6 @@ puffs_vnop_inactive(void *v) struct puffs_mount *pmp = MPTOPUFFSMP(vp->v_mount); struct puffs_node *pnode; bool recycle = false; - int error; pnode = vp->v_data; mutex_enter(&pnode->pn_sizemtx); @@ -1288,9 +1285,8 @@ puffs_vnop_inactive(void *v) PUFFS_MSG_ALLOC(vn, inactive); puffs_msg_setinfo(park_inactive, PUFFSOP_VN, PUFFS_VN_INACTIVE, VPTOPNC(vp)); - - PUFFS_MSG_ENQUEUEWAIT2(pmp, park_inactive, vp->v_data, - NULL, error); + PUFFS_MSG_ENQUEUEWAIT2_NOERROR(pmp, park_inactive, vp->v_data, + NULL); PUFFS_MSG_RELEASE(inactive); } pnode->pn_stat &= ~PNODE_DOINACT; @@ -1584,7 +1580,7 @@ puffs_vnop_poll(void *v) struct vnode *vp = ap->a_vp; struct puffs_mount *pmp = MPTOPUFFSMP(vp->v_mount); struct puffs_node *pn = vp->v_data; - int events, error; + int events; if (EXISTSOP(pmp, POLL)) { mutex_enter(&pn->pn_mtx); @@ -1605,8 +1601,8 @@ puffs_vnop_poll(void *v) puffs_msg_setcall(park_poll, puffs_parkdone_poll, pn); selrecord(curlwp, &pn->pn_sel); - PUFFS_MSG_ENQUEUEWAIT2(pmp, park_poll, vp->v_data, - NULL, error); + PUFFS_MSG_ENQUEUEWAIT2_NOERROR(pmp, park_poll, + vp->v_data, NULL); PUFFS_MSG_RELEASE(poll); return 0; @@ -2440,7 +2436,6 @@ puffs_vnop_print(void *v) struct vnode *vp = ap->a_vp; struct puffs_mount *pmp = MPTOPUFFSMP(vp->v_mount); struct puffs_node *pn = vp->v_data; - int error; /* kernel portion */ printf("tag VT_PUFFS, vnode %p, puffs node: %p,\n" @@ -2454,8 +2449,8 @@ puffs_vnop_print(void *v) PUFFS_MSG_ALLOC(vn, print); puffs_msg_setinfo(park_print, PUFFSOP_VN, PUFFS_VN_PRINT, VPTOPNC(vp)); - PUFFS_MSG_ENQUEUEWAIT2(pmp, park_print, vp->v_data, - NULL, error); + PUFFS_MSG_ENQUEUEWAIT2_NOERROR(pmp, park_print, vp->v_data, + NULL); PUFFS_MSG_RELEASE(print); }