diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-02-12 07:03:14 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-02-12 07:03:14 +0000 |
commit | 2fbd5547c84ceababf6359e4eb126b306d057692 (patch) | |
tree | d4ea3329254d003fc666b8aeb1d92f5f5ab4a904 /sys/kern/vfs_syscalls.c | |
parent | 06e45677214e0f48de64e9b7279df6b278a693a1 (diff) |
Check if softdep is enabled for this fs before calling softdep's
fsync; art@ ok.
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 7979efaf68b..cf680b13dbc 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.65 2000/04/20 06:32:00 deraadt Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.66 2001/02/12 07:03:13 fgsch Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -2279,8 +2279,9 @@ sys_fsync(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 = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p); + if (error == 0 && bioops.io_fsync != NULL && + vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP)) error = (*bioops.io_fsync)(vp); VOP_UNLOCK(vp, 0, p); |