PR kern/40246 current panics when removing swap devices

Someone was smoking crack when they decided to unconditionally OR FSYNC_VFS
into the flags for block devices.
This commit is contained in:
ad 2008-12-22 11:46:33 +00:00
parent 215b203640
commit 0472423773

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_vnops.c,v 1.105 2008/12/21 10:44:32 ad Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.106 2008/12/22 11:46:33 ad Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.105 2008/12/21 10:44:32 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.106 2008/12/22 11:46:33 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@ -295,9 +295,6 @@ ffs_fsync(void *v)
if ((ap->a_offlo == 0 && ap->a_offhi == 0) || DOINGSOFTDEP(vp) ||
(vp->v_type != VREG)) {
int flags = ap->a_flags;
if (vp->v_type == VBLK)
flags |= FSYNC_VFS;
error = ffs_full_fsync(vp, flags);
goto out;
}
@ -468,6 +465,7 @@ ffs_full_fsync(struct vnode *vp, int flags)
}
if (error || (flags & FSYNC_NOLOG))
return error;
/*
* Don't flush the log if the vnode being flushed
* contains no dirty buffers that could be in the log.