From 849854f24022fe42e014122837d80edcee73b5b0 Mon Sep 17 00:00:00 2001 From: jeff Date: Sat, 4 Oct 2003 08:51:50 +0000 Subject: - 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. --- sys/nfsclient/nfs_bio.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sys/nfsclient') 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; -- cgit v1.1