diff options
author | jeff <jeff@FreeBSD.org> | 2003-10-04 08:51:50 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-10-04 08:51:50 +0000 |
commit | 849854f24022fe42e014122837d80edcee73b5b0 (patch) | |
tree | 6348ba754d846bd17355e1a09cdfcaf283e14039 /sys | |
parent | bf121d8ed4a8372f9023c34336bf700497113f0d (diff) | |
download | FreeBSD-src-849854f24022fe42e014122837d80edcee73b5b0.zip FreeBSD-src-849854f24022fe42e014122837d80edcee73b5b0.tar.gz |
- 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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/nwfs/nwfs_io.c | 6 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_io.c | 6 | ||||
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 11 |
3 files changed, 8 insertions, 15 deletions
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index 5f8ab333..a64b844 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -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; diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index e408bea..eed3789 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -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; diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 9e613ad..a0d507e 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -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; |