Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ufs Get rid of UFS_WAPBL_BEGIN1/END1
details: https://anonhg.NetBSD.org/src/rev/4732ca5c0392
branches: trunk
changeset: 345333:4732ca5c0392
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu May 19 18:32:03 2016 +0000
description:
Get rid of UFS_WAPBL_BEGIN1/END1
ufs makeinode no longer releases dvp, so incrementing the
usecount for wapbl is unnecessary.
>From coypu.
diffstat:
sys/ufs/ufs/ufs_vnops.c | 20 ++++++++++----------
sys/ufs/ufs/ufs_wapbl.h | 7 +------
2 files changed, 11 insertions(+), 16 deletions(-)
diffs (120 lines):
diff -r 54d085b1be42 -r 4732ca5c0392 sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c Thu May 19 15:41:18 2016 +0000
+++ b/sys/ufs/ufs/ufs_vnops.c Thu May 19 18:32:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_vnops.c,v 1.231 2015/09/01 06:09:23 dholland Exp $ */
+/* $NetBSD: ufs_vnops.c,v 1.232 2016/05/19 18:32:03 riastradh Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.231 2015/09/01 06:09:23 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.232 2016/05/19 18:32:03 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -151,7 +151,7 @@
UFS_CHECK_CRAPCOUNTER(VTOI(dvp));
/*
- * UFS_WAPBL_BEGIN1(dvp->v_mount, dvp) performed by successful
+ * UFS_WAPBL_BEGIN(dvp->v_mount) performed by successful
* ufs_makeinode
*/
fstrans_start(dvp->v_mount, FSTRANS_SHARED);
@@ -160,7 +160,7 @@
fstrans_done(dvp->v_mount);
return (error);
}
- UFS_WAPBL_END1(dvp->v_mount, dvp);
+ UFS_WAPBL_END(dvp->v_mount);
fstrans_done(dvp->v_mount);
VN_KNOTE(dvp, NOTE_WRITE);
VOP_UNLOCK(*ap->a_vpp);
@@ -194,7 +194,7 @@
UFS_CHECK_CRAPCOUNTER(VTOI(ap->a_dvp));
/*
- * UFS_WAPBL_BEGIN1(dvp->v_mount, dvp) performed by successful
+ * UFS_WAPBL_BEGIN(dvp->v_mount) performed by successful
* ufs_makeinode
*/
fstrans_start(ap->a_dvp->v_mount, FSTRANS_SHARED);
@@ -204,7 +204,7 @@
ip = VTOI(*vpp);
ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE;
UFS_WAPBL_UPDATE(*vpp, NULL, NULL, 0);
- UFS_WAPBL_END1(ap->a_dvp->v_mount, ap->a_dvp);
+ UFS_WAPBL_END(ap->a_dvp->v_mount);
VOP_UNLOCK(*vpp);
out:
fstrans_done(ap->a_dvp->v_mount);
@@ -1200,7 +1200,7 @@
UFS_CHECK_CRAPCOUNTER(VTOI(ap->a_dvp));
/*
- * UFS_WAPBL_BEGIN1(dvp->v_mount, dvp) performed by successful
+ * UFS_WAPBL_BEGIN(dvp->v_mount) performed by successful
* ufs_makeinode
*/
fstrans_start(ap->a_dvp->v_mount, FSTRANS_SHARED);
@@ -1232,7 +1232,7 @@
error = ufs_bufio(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
IO_NODELOCKED | IO_JOURNALLOCKED, ap->a_cnp->cn_cred, NULL,
NULL);
- UFS_WAPBL_END1(ap->a_dvp->v_mount, ap->a_dvp);
+ UFS_WAPBL_END(ap->a_dvp->v_mount);
VOP_UNLOCK(vp);
if (error)
vrele(vp);
@@ -1784,7 +1784,7 @@
}
*vpp = tvp;
ip = VTOI(tvp);
- error = UFS_WAPBL_BEGIN1(dvp->v_mount, dvp);
+ error = UFS_WAPBL_BEGIN(dvp->v_mount);
if (error) {
vput(tvp);
return (error);
@@ -1832,7 +1832,7 @@
DIP_ASSIGN(ip, nlink, 0);
ip->i_flag |= IN_CHANGE;
UFS_WAPBL_UPDATE(tvp, NULL, NULL, 0);
- UFS_WAPBL_END1(dvp->v_mount, dvp);
+ UFS_WAPBL_END(dvp->v_mount);
vput(tvp);
return (error);
}
diff -r 54d085b1be42 -r 4732ca5c0392 sys/ufs/ufs/ufs_wapbl.h
--- a/sys/ufs/ufs/ufs_wapbl.h Thu May 19 15:41:18 2016 +0000
+++ b/sys/ufs/ufs/ufs_wapbl.h Thu May 19 18:32:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_wapbl.h,v 1.8 2013/11/10 18:28:08 christos Exp $ */
+/* $NetBSD: ufs_wapbl.h,v 1.9 2016/05/19 18:32:03 riastradh Exp $ */
/*-
* Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc.
@@ -134,10 +134,7 @@
#define UFS_WAPBL_BEGIN(mp) \
ufs_wapbl_begin2(mp, NULL, NULL, __FUNCTION__, __LINE__)
-#define UFS_WAPBL_BEGIN1(mp, v1) \
- ufs_wapbl_begin2(mp, v1, NULL, __FUNCTION__, __LINE__)
#define UFS_WAPBL_END(mp) ufs_wapbl_end2(mp, NULL, NULL)
-#define UFS_WAPBL_END1(mp, v1) ufs_wapbl_end2(mp, v1, NULL)
#define UFS_WAPBL_UPDATE(vp, access, modify, flags) \
if ((vp)->v_mount->mnt_wapbl) { \
@@ -164,9 +161,7 @@
#else /* ! WAPBL */
#define UFS_WAPBL_BEGIN(mp) (__USE(mp), 0)
-#define UFS_WAPBL_BEGIN1(mp, v1) 0
#define UFS_WAPBL_END(mp) do { } while (0)
-#define UFS_WAPBL_END1(mp, v1)
#define UFS_WAPBL_UPDATE(vp, access, modify, flags) do { } while (0)
#define UFS_WAPBL_JLOCK_ASSERT(mp)
#define UFS_WAPBL_JUNLOCK_ASSERT(mp)
Home |
Main Index |
Thread Index |
Old Index