Get rid of UFS_WAPBL_BEGIN1/END1
ufs makeinode no longer releases dvp, so incrementing the usecount for wapbl is unnecessary. From coypu.
This commit is contained in:
parent
7b6e3dab7a
commit
d7214352ea
|
@ -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_create(void *v)
|
|||
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 @@ ufs_create(void *v)
|
|||
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_mknod(void *v)
|
|||
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 @@ ufs_mknod(void *v)
|
|||
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_symlink(void *v)
|
|||
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 @@ ufs_symlink(void *v)
|
|||
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 @@ ufs_makeinode(struct vattr *vap, struct vnode *dvp,
|
|||
}
|
||||
*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 @@ ufs_makeinode(struct vattr *vap, struct vnode *dvp,
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -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 @@ ufs_wapbl_end2(struct mount *mp, struct vnode *vp1, struct vnode *vp2)
|
|||
|
||||
#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 @@ ufs_wapbl_end2(struct mount *mp, struct vnode *vp1, struct vnode *vp2)
|
|||
|
||||
#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)
|
||||
|
|
Loading…
Reference in New Issue