diff options
author | phk <phk@FreeBSD.org> | 2005-02-19 11:44:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-02-19 11:44:57 +0000 |
commit | 66dfd6396149e353342cd31080e6b88469aec335 (patch) | |
tree | d9295850a39808606f8fe29612e510d2f3b4ef1a /sys/nfsclient/nfs_vnops.c | |
parent | 480b39e8f236038a1603ca2d67104be32bf2b696 (diff) | |
download | FreeBSD-src-66dfd6396149e353342cd31080e6b88469aec335.zip FreeBSD-src-66dfd6396149e353342cd31080e6b88469aec335.tar.gz |
Try to unbreak the vnode locking around vop_reclaim() (based mostly on
patch from kan@).
Pull bufobj_invalbuf() out of vinvalbuf() and make g_vfs call it on
close. This is not yet a generally safe function, but for this very
specific use it is safe. This solves the problem with buffers not
being flushed by unmount or after failed mount attempts.
Diffstat (limited to 'sys/nfsclient/nfs_vnops.c')
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index 5a90982..1c41c93 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -538,7 +538,9 @@ nfs_close(struct vop_close_args *ap) error = nfs_flush(vp, MNT_WAIT, ap->a_td, cm); /* np->n_flag &= ~NMODIFIED; */ } else { + VOP_LOCK(vp, LK_EXCLUSIVE, curthread); error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); + VOP_UNLOCK(vp, 0, curthread); } } /* |