Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ufs Simplify ufs_wapbl_begin2/end2, drop 2 suffix



details:   https://anonhg.NetBSD.org/src/rev/5fdc179c12fc
branches:  trunk
changeset: 345334:5fdc179c12fc
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu May 19 18:32:11 2016 +0000

description:
Simplify ufs_wapbl_begin2/end2, drop 2 suffix

We are no longer calling UFS_WAPBL_BEGIN/END with vnodes (we are giving
NULL as a parameter in all cases), so we can get rid of this input
parameter and the relevant check.

>From coypu.

diffstat:

 sys/ufs/ufs/ufs_wapbl.h |  20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diffs (55 lines):

diff -r 4732ca5c0392 -r 5fdc179c12fc sys/ufs/ufs/ufs_wapbl.h
--- a/sys/ufs/ufs/ufs_wapbl.h   Thu May 19 18:32:03 2016 +0000
+++ b/sys/ufs/ufs/ufs_wapbl.h   Thu May 19 18:32:11 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_wapbl.h,v 1.9 2016/05/19 18:32:03 riastradh Exp $  */
+/*     $NetBSD: ufs_wapbl.h,v 1.10 2016/05/19 18:32:11 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc.
@@ -95,16 +95,10 @@
 #endif
 
 static __inline int
-ufs_wapbl_begin2(struct mount *mp, struct vnode *vp1, struct vnode *vp2,
-                const char *file, int line)
+ufs_wapbl_begin(struct mount *mp, const char *file, int line)
 {
        if (mp->mnt_wapbl) {
                int error;
-
-               if (vp1)
-                       vref(vp1);
-               if (vp2)
-                       vref(vp2);
                error = wapbl_begin(mp->mnt_wapbl, file, line);
                if (error)
                        return error;
@@ -117,7 +111,7 @@
 }
 
 static __inline void
-ufs_wapbl_end2(struct mount *mp, struct vnode *vp1, struct vnode *vp2)
+ufs_wapbl_end(struct mount *mp)
 {
        if (mp->mnt_wapbl) {
 #ifdef WAPBL_DEBUG_INODES
@@ -125,16 +119,12 @@
                        ufs_wapbl_verify_inodes(mp, "wapbl_end");
 #endif
                wapbl_end(mp->mnt_wapbl);
-               if (vp2)
-                       vrele(vp2);
-               if (vp1)
-                       vrele(vp1);
        }
 }
 
 #define        UFS_WAPBL_BEGIN(mp)                                             \
-       ufs_wapbl_begin2(mp, NULL, NULL, __FUNCTION__, __LINE__)
-#define        UFS_WAPBL_END(mp)       ufs_wapbl_end2(mp, NULL, NULL)
+       ufs_wapbl_begin(mp, __FUNCTION__, __LINE__)
+#define        UFS_WAPBL_END(mp) ufs_wapbl_end(mp)
 
 #define        UFS_WAPBL_UPDATE(vp, access, modify, flags)                     \
        if ((vp)->v_mount->mnt_wapbl) {                                 \



Home | Main Index | Thread Index | Old Index