git: b75412fea1da - main - kern_undelete: remove unused pathseg argument

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Thu, 12 Nov 2026 13:00:05 UTC
The branch main has been updated by brooks:

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

commit b75412fea1dab5e49f7c55230033200c914fbcf6
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2026-11-12 12:59:47 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2026-11-12 12:59:47 +0000

    kern_undelete: remove unused pathseg argument
    
    I'd failed to pass it down to NDINIT, but nothing calls kern_uninit
    with a path argument in sys space here or in CheriBSD so just drop it.
    
    Effort:         CHERI upstreaming
    Reported by:    llm-postcr
    Sponsored by:   Innovate UK
    Fixes:          7273d80ba18c ("vfs_syscalls.c: add kern_ and user_ implementations")
---
 sys/kern/vfs_syscalls.c | 4 ++--
 sys/sys/syscallsubr.h   | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 472abac6bb97..782443957e4c 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1962,11 +1962,11 @@ struct undelete_args {
 int
 sys_undelete(struct thread *td, struct undelete_args *uap)
 {
-	return (kern_undelete(td, uap->path, UIO_USERSPACE));
+	return (kern_undelete(td, uap->path));
 }
 
 int
-kern_undelete(struct thread *td, const char *path, enum uio_seg pathseg)
+kern_undelete(struct thread *td, const char *path)
 {
 	struct mount *mp;
 	struct nameidata nd;
diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h
index c65836b9104c..66c07c59a52f 100644
--- a/sys/sys/syscallsubr.h
+++ b/sys/sys/syscallsubr.h
@@ -566,8 +566,7 @@ int	kern_timerfd_settime(struct thread *td, int fd, int flags,
 	    const struct itimerspec *new_value, struct itimerspec *old_value);
 int	kern_truncate(struct thread *td, const char *path,
 	    enum uio_seg pathseg, off_t length);
-int	kern_undelete(struct thread *td, const char *path,
-	    enum uio_seg pathseg);
+int	kern_undelete(struct thread *td, const char *path);
 int	kern_utimesat(struct thread *td, int fd, const char *path,
 	    enum uio_seg pathseg, const struct timeval *tptr,
 	    enum uio_seg tptrseg);