git: 8f6769b82a2a - stable/14 - file: Fix the !CAPABILITIES build

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 29 Jul 2025 22:19:51 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=8f6769b82a2a071cf07080b6d77639e919efbbcf

commit 8f6769b82a2a071cf07080b6d77639e919efbbcf
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-06-29 16:56:59 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-07-29 22:19:17 +0000

    file: Fix the !CAPABILITIES build
    
    Reported by:    Ian FREISLICH <ianfreislich@gmail.com>
    Fixes:  f35525ff2053 ("file: Add a fd flag with O_RESOLVE_BENEATH semantics")
    
    (cherry picked from commit 6783dfb10637100067520bd6d9804e154cfee7ee)
---
 sys/kern/kern_descrip.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index d84c97669320..0e6af0f5deff 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -2966,7 +2966,7 @@ fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp,
     uint8_t *flagsp, struct file **fpp, struct filecaps *havecapsp)
 {
 	int error;
-	error = fget_unlocked(td, fd, needrightsp, flagsp, fpp);
+	error = fget_unlocked_flags(td, fd, needrightsp, flagsp, fpp);
 	if (havecapsp != NULL && error == 0)
 		filecaps_fill(havecapsp);
 
@@ -3143,7 +3143,6 @@ fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, int *flagsp)
 	flags = fp->f_flag & FSEARCH;
 	flags |= (fde->fde_flags & UF_RESOLVE_BENEATH) != 0 ?
 	    O_RESOLVE_BENEATH : 0;
-	*fsearch = ((fp->f_flag & FSEARCH) != 0);
 	vp = fp->f_vnode;
 	if (__predict_false(vp == NULL || vp->v_type != VDIR)) {
 		return (EAGAIN);