git: b935e867af18 - main - Tree-wide replacement of VOP_UNLOCK + vrele combo with vput
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Nov 2022 23:37:35 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b935e867af1855d008de127151d69a1061541ba5 commit b935e867af1855d008de127151d69a1061541ba5 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-11-07 23:33:15 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2022-11-07 23:34:27 +0000 Tree-wide replacement of VOP_UNLOCK + vrele combo with vput No functional changes. --- sys/fs/ext2fs/ext2_vfsops.c | 9 +++------ sys/fs/fuse/fuse_vfsops.c | 3 +-- sys/fs/msdosfs/msdosfs_vfsops.c | 3 +-- sys/ufs/ufs/ufs_quota.c | 9 +++------ 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index d66d44c6ba32..408f3dac6833 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -812,8 +812,7 @@ loop: error = bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)), (int)fs->e2fs_bsize, NOCRED, &bp); if (error) { - VOP_UNLOCK(vp); - vrele(vp); + vput(vp); MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); return (error); } @@ -822,8 +821,7 @@ loop: EXT2_INODE_SIZE(fs) * ino_to_fsbo(fs, ip->i_number)), ip); brelse(bp); - VOP_UNLOCK(vp); - vrele(vp); + vput(vp); if (error) { MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); @@ -1167,8 +1165,7 @@ loop: } if ((error = VOP_FSYNC(vp, waitfor, td)) != 0) allerror = error; - VOP_UNLOCK(vp); - vrele(vp); + vput(vp); } /* diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index fa0766fb0d33..93916b34be83 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -624,8 +624,7 @@ fuse_vfsop_root(struct mount *mp, int lkflags, struct vnode **vpp) SDT_PROBE2(fusefs, , vfsops, trace, 1, "root vnode race"); FUSE_UNLOCK(); - VOP_UNLOCK(*vpp); - vrele(*vpp); + vput(*vpp); vrecycle(*vpp); *vpp = data->vroot; } else diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index cb7153fe1f7f..dfe31ca18b9a 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -1041,8 +1041,7 @@ loop: error = VOP_FSYNC(vp, waitfor, td); if (error) allerror = error; - VOP_UNLOCK(vp); - vrele(vp); + vput(vp); } /* diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 010acbe67da7..b279dc8fe221 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -615,13 +615,11 @@ again: goto again; } if (vp->v_type == VNON || vp->v_writecount <= 0) { - VOP_UNLOCK(vp); - vrele(vp); + vput(vp); continue; } error = getinoquota(VTOI(vp)); - VOP_UNLOCK(vp); - vrele(vp); + vput(vp); if (error) { MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); break; @@ -684,8 +682,7 @@ again: dq = ip->i_dquot[type]; ip->i_dquot[type] = NODQUOT; dqrele(vp, dq); - VOP_UNLOCK(vp); - vrele(vp); + vput(vp); } error = dqflush(qvp);