summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-09-19 23:37:49 +0000
committerjeff <jeff@FreeBSD.org>2003-09-19 23:37:49 +0000
commit4d0b3883a4a6b6752c9b26a342020f65e35f5494 (patch)
tree21373886257a10900ef61da5ca170191f4e0fb3b /sys/fs/nwfs
parent265b2be119b5fdb39eee7541529f95fbb316f745 (diff)
downloadFreeBSD-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/fs/nwfs')
-rw-r--r--sys/fs/nwfs/nwfs_io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c
index ddd2b1b..5f8ab333 100644
--- a/sys/fs/nwfs/nwfs_io.c
+++ b/sys/fs/nwfs/nwfs_io.c
@@ -607,12 +607,12 @@ nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
/* struct nwmount *nmp = VTONWFS(vp);*/
int error = 0, slpflag, slptimeo;
- VI_LOCK(vp);
if (vp->v_iflag & VI_XLOCK) {
- VI_UNLOCK(vp);
+#ifdef INVARIANTS
+ backtrace();
+#endif
return (0);
}
- VI_UNLOCK(vp);
if (intrflg) {
slpflag = PCATCH;
OpenPOWER on IntegriCloud