Module Name: src
Committed By: riastradh
Date: Thu May 19 18:32:11 UTC 2016
Modified Files:
src/sys/ufs/ufs: ufs_wapbl.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/ufs/ufs/ufs_wapbl.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ufs/ufs/ufs_wapbl.h
diff -u src/sys/ufs/ufs/ufs_wapbl.h:1.9 src/sys/ufs/ufs/ufs_wapbl.h:1.10
--- src/sys/ufs/ufs/ufs_wapbl.h:1.9 Thu May 19 18:32:03 2016
+++ src/sys/ufs/ufs/ufs_wapbl.h Thu May 19 18:32:11 2016
@@ -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 @@ void ufs_wapbl_verify_inodes(struct moun
#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 @@ ufs_wapbl_begin2(struct mount *mp, struc
}
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_end2(struct mount *mp, struct
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) { \