Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs ffs_fsync: no need for wapbl_vptomp() here -- vn...
details: https://anonhg.NetBSD.org/src/rev/6f8d6db6b66a
branches: trunk
changeset: 764303:6f8d6db6b66a
user: hannken <hannken%NetBSD.org@localhost>
date: Fri Apr 15 15:54:11 2011 +0000
description:
ffs_fsync: no need for wapbl_vptomp() here -- vnode is always VREG.
diffstat:
sys/ufs/ffs/ffs_vnops.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diffs (91 lines):
diff -r d19ffc56e4db -r 6f8d6db6b66a sys/ufs/ffs/ffs_vnops.c
--- a/sys/ufs/ffs/ffs_vnops.c Fri Apr 15 15:50:28 2011 +0000
+++ b/sys/ufs/ffs/ffs_vnops.c Fri Apr 15 15:54:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vnops.c,v 1.116 2010/08/12 07:41:49 hannken Exp $ */
+/* $NetBSD: ffs_vnops.c,v 1.117 2011/04/15 15:54:11 hannken Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.116 2010/08/12 07:41:49 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.117 2011/04/15 15:54:11 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -282,19 +282,18 @@
int bsize;
daddr_t blk_high;
struct vnode *vp;
-#ifdef WAPBL
struct mount *mp;
-#endif
vp = ap->a_vp;
+ mp = vp->v_mount;
- fstrans_start(vp->v_mount, FSTRANS_LAZY);
+ fstrans_start(mp, FSTRANS_LAZY);
if ((ap->a_offlo == 0 && ap->a_offhi == 0) || (vp->v_type != VREG)) {
error = ffs_full_fsync(vp, ap->a_flags);
goto out;
}
- bsize = vp->v_mount->mnt_stat.f_iosize;
+ bsize = mp->mnt_stat.f_iosize;
blk_high = ap->a_offhi / bsize;
if (ap->a_offhi % bsize != 0)
blk_high++;
@@ -312,7 +311,7 @@
}
#ifdef WAPBL
- mp = wapbl_vptomp(vp);
+ KASSERT(vp->v_type == VREG);
if (mp->mnt_wapbl) {
/*
* Don't bother writing out metadata if the syncer is
@@ -321,7 +320,7 @@
* VFS_SYNC().
*/
if ((ap->a_flags & (FSYNC_DATAONLY | FSYNC_LAZY)) != 0) {
- fstrans_done(vp->v_mount);
+ fstrans_done(mp);
return 0;
}
error = 0;
@@ -330,7 +329,7 @@
IN_MODIFIED | IN_ACCESSED)) {
error = UFS_WAPBL_BEGIN(mp);
if (error) {
- fstrans_done(vp->v_mount);
+ fstrans_done(mp);
return error;
}
error = ffs_update(vp, NULL, NULL, UPDATE_CLOSE |
@@ -338,11 +337,11 @@
UFS_WAPBL_END(mp);
}
if (error || (ap->a_flags & FSYNC_NOLOG) != 0) {
- fstrans_done(vp->v_mount);
+ fstrans_done(mp);
return error;
}
error = wapbl_flush(mp->mnt_wapbl, 0);
- fstrans_done(vp->v_mount);
+ fstrans_done(mp);
return error;
}
#endif /* WAPBL */
@@ -389,7 +388,7 @@
}
out:
- fstrans_done(vp->v_mount);
+ fstrans_done(mp);
return error;
}
Home |
Main Index |
Thread Index |
Old Index