diff options
author | jeff <jeff@FreeBSD.org> | 2003-10-05 06:43:30 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-10-05 06:43:30 +0000 |
commit | 9f28715adc09173973fce9dea6606d3ba89b64b1 (patch) | |
tree | 07cfb116a30000d1b61a93af2d75383abecccd01 /sys | |
parent | 29b3b781c2d4719782f46f1de18aadd6aeac1b87 (diff) | |
download | FreeBSD-src-9f28715adc09173973fce9dea6606d3ba89b64b1.zip FreeBSD-src-9f28715adc09173973fce9dea6606d3ba89b64b1.tar.gz |
- Check XLOCK prior to accessing v_data.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/coda/coda_subr.c | 6 | ||||
-rw-r--r-- | sys/fs/coda/coda_subr.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sys/coda/coda_subr.c b/sys/coda/coda_subr.c index 9871bd6..edb95c9 100644 --- a/sys/coda/coda_subr.c +++ b/sys/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); } 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); } |