From 9f28715adc09173973fce9dea6606d3ba89b64b1 Mon Sep 17 00:00:00 2001 From: jeff Date: Sun, 5 Oct 2003 06:43:30 +0000 Subject: - Check XLOCK prior to accessing v_data. --- sys/fs/coda/coda_subr.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/fs') diff --git a/sys/fs/coda/coda_subr.c b/sys/fs/coda/coda_subr.c index 9871bd6..edb95c9 100644 --- a/sys/fs/coda/coda_subr.c +++ b/sys/fs/coda/coda_subr.c @@ -318,6 +318,11 @@ coda_checkunmounting(mp) nvp = TAILQ_NEXT(vp, v_nmntvnodes); if (vp->v_mount != mp) continue; + VI_LOCK(vp); + if (vp->v_iflag & VI_XLOCK) { + VI_UNLOCK(vp); + continue; + } cp = VTOC(vp); count++; if (!(cp->c_flags & C_UNMOUNTING)) { @@ -325,6 +330,7 @@ coda_checkunmounting(mp) printf("vp %p, cp %p missed\n", vp, cp); cp->c_flags |= C_UNMOUNTING; } + VI_UNLOCK(vp); } mtx_unlock(&mntvnode_mtx); } -- cgit v1.1