diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-02-26 17:24:56 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-02-26 17:24:56 +0000 |
commit | f455171ee03f6ac7be6b069f4d9047ec1cb5d482 (patch) | |
tree | 4c80647f4577d7b4d538018fe518bcef54ac8963 /sys/compat/netbsd/netbsd_misc.c | |
parent | 0e457c361d24db2e3c90efa55e400bd8420d6f43 (diff) |
Since netbsd_sys_fdatasync is the same code as sys_fsync, we
can simply call sys_fsync instead of copying code.
Diffstat (limited to 'sys/compat/netbsd/netbsd_misc.c')
-rw-r--r-- | sys/compat/netbsd/netbsd_misc.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/sys/compat/netbsd/netbsd_misc.c b/sys/compat/netbsd/netbsd_misc.c index 6cce5a52396..9504031a292 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.9 2001/02/26 16:32:32 art Exp $ */ +/* $OpenBSD: netbsd_misc.c,v 1.10 2001/02/26 17:24:55 art Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -76,22 +76,8 @@ netbsd_sys_fdatasync(p, v, retval) struct netbsd_sys_fdatasync_args /* { syscallarg(int) fd; } */ *uap = v; - register struct vnode *vp; - struct file *fp; - int error; - - if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) - return (error); - vp = (struct vnode *)fp->f_data; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); - 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); + return sys_fsync(p, uap, retval); } /*ARGSUSED*/ |