From 60457d1ea0680dfec0efa80832339a7b4fa96160 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Mon, 12 Sep 2022 23:20:59 +0000 Subject: ufs: try to elide the interlock in ufs_itimes Reviewed by: kib, mckusick Differential Revision: https://reviews.freebsd.org/D36522 (cherry picked from commit 04f095a49165cf4903fda0f21271be5c6bfa5857) --- sys/ufs/ufs/ufs_vnops.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 8eeb3ac84f6b..a6ca523ae87c 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -188,6 +188,11 @@ ufs_itimes_locked(struct vnode *vp) void ufs_itimes(struct vnode *vp) { + struct inode *ip; + + ip = VTOI(vp); + if ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) == 0) + return; VI_LOCK(vp); ufs_itimes_locked(vp); -- cgit v1.2.3