Never call softdep_sync_metadata() in the FSYNC_RECLAIM case. Any pending

blocks are detached from the vnode at this point.  When the dependencies are
broken to enable writing the blocks, the vnode will be regenerated.  (The only
reason we sync buffers in this case is that they have to be detached from the
vnode.)
This commit is contained in:
mycroft 2000-05-29 17:19:20 +00:00
parent c47adf55e0
commit 941524439a
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_vnops.c,v 1.29 2000/05/29 17:12:06 mycroft Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.30 2000/05/29 17:19:20 mycroft Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -309,7 +309,8 @@ loop:
* Ensure that any filesystem metadata associated
* with the vnode has been written.
*/
if ((error = softdep_sync_metadata(ap)) != 0)
if ((ap->a_flags & FSYNC_RECLAIM) == 0 &&
(error = softdep_sync_metadata(ap)) != 0)
return (error);
s = splbio();