summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2000-07-04 03:23:29 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2000-07-04 03:23:29 +0000
commit376421966340ae99bc19236777d3df7f0915fee6 (patch)
treef991b7e2e27f1329dd29ae4754f991c10b74a52b /sys/kern/vfs_subr.c
parent4572bcfe0556ca39451a60bd2faf9ee00135bfcf (diff)
Notes
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 684bcd4bee53..fa6e117bd354 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1660,14 +1660,20 @@ vclean(vp, flags, p)
/*
* Clean out any buffers associated with the vnode.
+ * If the flush fails, just toss the buffers.
*/
- vinvalbuf(vp, V_SAVE, NOCRED, p, 0, 0);
+ if (flags & DOCLOSE) {
+ if (vinvalbuf(vp, V_SAVE, NOCRED, p, 0, 0) != 0)
+ vinvalbuf(vp, 0, NOCRED, p, 0, 0);
+ }
+
if ((obj = vp->v_object) != NULL) {
if (obj->ref_count == 0) {
/*
- * vclean() may be called twice. The first time removes the
- * primary reference to the object, the second time goes
- * one further and is a special-case to terminate the object.
+ * vclean() may be called twice. The first time
+ * removes the primary reference to the object,
+ * the second time goes one further and is a
+ * special-case to terminate the object.
*/
vm_object_terminate(obj);
} else {