diff options
-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); } |