- Remove the backtrace() call from the *_vinvalbuf() functions. Thanks to a

stack trace supplied by phk, I now understand what's going on here.  The
   check for VI_XLOCK stops us from calling vinvalbuf once the vnode has been
   partially torn down in vclean().  It is not clear that this would cause
   a problem.  Document this in nfs_bio.c, which is where the other two
   filesystems copied this code from.
This commit is contained in:
jeff 2003-10-04 08:51:50 +00:00
parent bf121d8ed4
commit 849854f240
3 changed files with 8 additions and 15 deletions

View File

@ -607,12 +607,8 @@ nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
/* struct nwmount *nmp = VTONWFS(vp);*/
int error = 0, slpflag, slptimeo;
if (vp->v_iflag & VI_XLOCK) {
#ifdef INVARIANTS
backtrace();
#endif
if (vp->v_iflag & VI_XLOCK)
return (0);
}
if (intrflg) {
slpflag = PCATCH;

View File

@ -679,12 +679,8 @@ smbfs_vinvalbuf(vp, flags, cred, td, intrflg)
struct smbnode *np = VTOSMB(vp);
int error = 0, slpflag, slptimeo;
if (vp->v_iflag & VI_XLOCK) {
#ifdef INVARIANTS
backtrace();
#endif
if (vp->v_iflag & VI_XLOCK)
return 0;
}
if (intrflg) {
slpflag = PCATCH;

View File

@ -1067,12 +1067,13 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
ASSERT_VOP_LOCKED(vp, "nfs_vinvalbuf");
if (vp->v_iflag & VI_XLOCK) {
#ifdef INVARIANTS
backtrace();
#endif
/*
* XXX This check stops us from needlessly doing a vinvalbuf when
* being called through vclean(). It is not clear that this is
* unsafe.
*/
if (vp->v_iflag & VI_XLOCK)
return (0);
}
if ((nmp->nm_flag & NFSMNT_INT) == 0)
intrflg = 0;