diff options
author | jeff <jeff@FreeBSD.org> | 2003-09-19 23:37:49 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-09-19 23:37:49 +0000 |
commit | 4d0b3883a4a6b6752c9b26a342020f65e35f5494 (patch) | |
tree | 21373886257a10900ef61da5ca170191f4e0fb3b /sys/nfsclient/nfs_bio.c | |
parent | 265b2be119b5fdb39eee7541529f95fbb316f745 (diff) | |
download | FreeBSD-src-4d0b3883a4a6b6752c9b26a342020f65e35f5494.zip FreeBSD-src-4d0b3883a4a6b6752c9b26a342020f65e35f5494.tar.gz |
- Remove interlock protection around VI_XLOCK. The interlock is not
sufficient to guarantee that this race is not hit. The XLOCK will likely
have to be redesigned due to the way reference counting and mutexes work
in FreeBSD. We currently can not be guaranteed that xlock was not set
and cleared while we were blocked on the interlock while waiting to check
for XLOCK. This would lead us to reference a vnode which was not the
vnode we requested.
- Add a backtrace() call inside of INVARIANTS in the hopes of finding out if
this condition is ever hit. It should not, since we should be retaining
a reference to the vnode in these cases. The reference would be sufficient
to block recycling.
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index aee3625..9e613ad 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -1067,13 +1067,12 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred, ASSERT_VOP_LOCKED(vp, "nfs_vinvalbuf"); - VI_LOCK(vp); if (vp->v_iflag & VI_XLOCK) { - /* XXX Should we wait here? */ - VI_UNLOCK(vp); +#ifdef INVARIANTS + backtrace(); +#endif return (0); } - VI_UNLOCK(vp); if ((nmp->nm_flag & NFSMNT_INT) == 0) intrflg = 0; |