git: ebf37c3fed04 - main - vfs: drop LK_RETRY when crossing mount points in vfs_lookup
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Jul 2023 01:15:46 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ebf37c3fed04f10d452b426cf83e741b6365a2ec commit ebf37c3fed04f10d452b426cf83e741b6365a2ec Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2023-07-05 22:56:04 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-07-07 01:14:55 +0000 vfs: drop LK_RETRY when crossing mount points in vfs_lookup vn_lock already returns the expected error. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40883 --- sys/kern/vfs_lookup.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 588ef88d24df..5a5560a4c26f 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1314,11 +1314,9 @@ good: crosslkflags &= ~LK_SHARED; crosslkflags |= LK_EXCLUSIVE | LK_CANRECURSE; } else if ((crosslkflags & LK_EXCLUSIVE) != 0) { - vn_lock(dp, LK_UPGRADE | LK_RETRY); - if (VN_IS_DOOMED(dp)) { - error = ENOENT; - goto bad2; - } + error = vn_lock(dp, LK_UPGRADE); + if (error != 0) + goto bad_unlocked; if (dp->v_mountedhere != mp) { continue; }