summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-10-05 06:43:30 +0000
committerjeff <jeff@FreeBSD.org>2003-10-05 06:43:30 +0000
commit9f28715adc09173973fce9dea6606d3ba89b64b1 (patch)
tree07cfb116a30000d1b61a93af2d75383abecccd01 /sys/fs
parent29b3b781c2d4719782f46f1de18aadd6aeac1b87 (diff)
downloadFreeBSD-src-9f28715adc09173973fce9dea6606d3ba89b64b1.zip
FreeBSD-src-9f28715adc09173973fce9dea6606d3ba89b64b1.tar.gz
- Check XLOCK prior to accessing v_data.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/coda/coda_subr.c6
1 files changed, 6 insertions, 0 deletions
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);
}
OpenPOWER on IntegriCloud