summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-02-26 16:32:33 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-02-26 16:32:33 +0000
commit576d6ac68857a0ca21dee93b36ed2e9a0ae7ddd5 (patch)
tree0514130e46c4a12002672f60a1ab8a622a255b13
parent5b4d37f0f93f1fa8ba7dc486e23ed366fbf9b825 (diff)
adapt to new softupdates changes.
-rw-r--r--sys/compat/netbsd/netbsd_misc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/compat/netbsd/netbsd_misc.c b/sys/compat/netbsd/netbsd_misc.c
index 8cf60355bab..6cce5a52396 100644
--- a/sys/compat/netbsd/netbsd_misc.c
+++ b/sys/compat/netbsd/netbsd_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netbsd_misc.c,v 1.8 2000/01/31 19:57:21 deraadt Exp $ */
+/* $OpenBSD: netbsd_misc.c,v 1.9 2001/02/26 16:32:32 art Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -84,9 +84,11 @@ netbsd_sys_fdatasync(p, v, retval)
return (error);
vp = (struct vnode *)fp->f_data;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
- if ((error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p)) == 0 &&
- bioops.io_fsync != NULL)
- error = (*bioops.io_fsync)(vp);
+ error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p);
+#ifdef FFS_SOFTUPDATES
+ if (error == 0 && vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP))
+ error = softdep_fsync(vp);
+#endif
VOP_UNLOCK(vp, 0, p);
return (error);