Date: Wed, 27 Jan 2010 19:30:45 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r203086 - head/sys/fs/nwfs Message-ID: <201001271930.o0RJUj58007179@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Wed Jan 27 19:30:44 2010 New Revision: 203086 URL: http://svn.freebsd.org/changeset/base/203086 Log: Don't touch v_interlock; use VI_* macros instead. Modified: head/sys/fs/nwfs/nwfs_node.c head/sys/fs/nwfs/nwfs_vnops.c Modified: head/sys/fs/nwfs/nwfs_node.c ============================================================================== --- head/sys/fs/nwfs/nwfs_node.c Wed Jan 27 18:33:22 2010 (r203085) +++ head/sys/fs/nwfs/nwfs_node.c Wed Jan 27 19:30:44 2010 (r203086) @@ -151,7 +151,7 @@ loop: rescan: if (nwfs_hashlookup(nmp, fid, &np) == 0) { vp = NWTOV(np); - mtx_lock(&vp->v_interlock); + VI_LOCK(vp); sx_xunlock(&nwhashlock); if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, curthread)) goto loop; Modified: head/sys/fs/nwfs/nwfs_vnops.c ============================================================================== --- head/sys/fs/nwfs/nwfs_vnops.c Wed Jan 27 18:33:22 2010 (r203085) +++ head/sys/fs/nwfs/nwfs_vnops.c Wed Jan 27 19:30:44 2010 (r203086) @@ -231,24 +231,24 @@ nwfs_close(ap) if (vp->v_type == VDIR) return 0; /* nothing to do now */ error = 0; - mtx_lock(&vp->v_interlock); + VI_LOCK(vp); if (np->opened == 0) { - mtx_unlock(&vp->v_interlock); + VI_UNLOCK(vp); return 0; } - mtx_unlock(&vp->v_interlock); + VI_UNLOCK(vp); error = nwfs_vinvalbuf(vp, ap->a_td); - mtx_lock(&vp->v_interlock); + VI_LOCK(vp); if (np->opened == 0) { - mtx_unlock(&vp->v_interlock); + VI_UNLOCK(vp); return 0; } if (--np->opened == 0) { - mtx_unlock(&vp->v_interlock); + VI_UNLOCK(vp); error = ncp_close_file(NWFSTOCONN(VTONWFS(vp)), &np->n_fh, ap->a_td, ap->a_cred); } else - mtx_unlock(&vp->v_interlock); + VI_UNLOCK(vp); np->n_atime = 0; return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001271930.o0RJUj58007179>