Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsclient/nfs_clbio.c
Show First 20 Lines • Show All 1,633 Lines • ▼ Show 20 Lines | if (!error) { | ||||
ssize_t left = uiop->uio_resid; | ssize_t left = uiop->uio_resid; | ||||
if (left > 0) | if (left > 0) | ||||
bzero((char *)bp->b_data + nread, left); | bzero((char *)bp->b_data + nread, left); | ||||
uiop->uio_resid = 0; | uiop->uio_resid = 0; | ||||
} | } | ||||
} | } | ||||
/* ASSERT_VOP_LOCKED(vp, "ncl_doio"); */ | /* ASSERT_VOP_LOCKED(vp, "ncl_doio"); */ | ||||
if (p && (vp->v_vflag & VV_TEXT)) { | if (p && vp->v_writecount == -1) { | ||||
markj: Shouldn't it be `<= -1` or `VOP_IS_TEXT(vp)`? | |||||
Done Inline ActionsVnode is potentially unlocked there, when called from the io thread. See the commented assert above. So VOP_IS_TEXT() does not work, and I do not want to remove the locked requirement from it. Changed to <= -1. kib: Vnode is potentially unlocked there, when called from the io thread. See the commented assert… | |||||
mtx_lock(&np->n_mtx); | mtx_lock(&np->n_mtx); | ||||
if (NFS_TIMESPEC_COMPARE(&np->n_mtime, &np->n_vattr.na_mtime)) { | if (NFS_TIMESPEC_COMPARE(&np->n_mtime, &np->n_vattr.na_mtime)) { | ||||
mtx_unlock(&np->n_mtx); | mtx_unlock(&np->n_mtx); | ||||
PROC_LOCK(p); | PROC_LOCK(p); | ||||
killproc(p, "text file modification"); | killproc(p, "text file modification"); | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
} else | } else | ||||
mtx_unlock(&np->n_mtx); | mtx_unlock(&np->n_mtx); | ||||
▲ Show 20 Lines • Show All 224 Lines • Show Last 20 Lines |
Shouldn't it be <= -1 or VOP_IS_TEXT(vp)?