git: ca63cbbe9554 - stable/13 - ufs: always call ufs_itimes on close
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Aug 2023 23:25:04 UTC
The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ca63cbbe95540bfcac3f6020ded5b5ed6522c6a2 commit ca63cbbe95540bfcac3f6020ded5b5ed6522c6a2 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-09-12 23:19:42 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-08-24 23:23:34 +0000 ufs: always call ufs_itimes on close While here dedup code with fifo. Reviewed by: kib, mckusick Differential Revision: https://reviews.freebsd.org/D36522 (cherry picked from commit be931de6c99f346cedb7a364602f1cb654a32caf) --- sys/ufs/ufs/ufs_vnops.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 8483e3f01255..8eeb3ac84f6b 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -351,13 +351,8 @@ ufs_close( } */ *ap) { struct vnode *vp = ap->a_vp; - int usecount; - VI_LOCK(vp); - usecount = vp->v_usecount; - if (usecount > 1) - ufs_itimes_locked(vp); - VI_UNLOCK(vp); + ufs_itimes(vp); return (0); } @@ -2645,14 +2640,8 @@ ufsfifo_close( struct thread *a_td; } */ *ap) { - struct vnode *vp = ap->a_vp; - int usecount; - VI_LOCK(vp); - usecount = vp->v_usecount; - if (usecount > 1) - ufs_itimes_locked(vp); - VI_UNLOCK(vp); + ufs_close(ap); return (fifo_specops.vop_close(ap)); }