git: ea392ed9b901 - main - inotify: Move 'td' to the first argument of kern_inotify_*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 30 Sep 2026 15:04:44 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=ea392ed9b901789fe4d2cee2dedd91c7747a9677
commit ea392ed9b901789fe4d2cee2dedd91c7747a9677
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-09-30 15:04:08 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-09-30 15:04:08 +0000
inotify: Move 'td' to the first argument of kern_inotify_*
This is consistent with other system call helpers.
Reviewed by: markj
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D60173
---
sys/compat/linux/linux_file.c | 6 +++---
sys/kern/vfs_inotify.c | 12 ++++++------
sys/sys/inotify.h | 6 +++---
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 9a1f21d5feb7..023da9a24772 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -2043,13 +2043,13 @@ linux_inotify_add_watch(struct thread *td,
args->mask);
return (EINVAL);
}
- return (kern_inotify_add_watch(args->fd, AT_FDCWD, args->pathname,
- args->mask, td));
+ return (kern_inotify_add_watch(td, args->fd, AT_FDCWD, args->pathname,
+ args->mask));
}
int
linux_inotify_rm_watch(struct thread *td,
struct linux_inotify_rm_watch_args *args)
{
- return (kern_inotify_rm_watch(args->fd, args->wd, td));
+ return (kern_inotify_rm_watch(td, args->fd, args->wd));
}
diff --git a/sys/kern/vfs_inotify.c b/sys/kern/vfs_inotify.c
index bc8db76d848b..2cf13a7485eb 100644
--- a/sys/kern/vfs_inotify.c
+++ b/sys/kern/vfs_inotify.c
@@ -921,8 +921,8 @@ fget_inotify(struct thread *td, int fd, const cap_rights_t *needrightsp,
}
int
-kern_inotify_add_watch(int fd, int dfd, const char *path, uint32_t mask,
- struct thread *td)
+kern_inotify_add_watch(struct thread *td, int fd, int dfd, const char *path,
+ uint32_t mask)
{
struct nameidata nd;
struct file *fp;
@@ -1002,12 +1002,12 @@ int
sys_inotify_add_watch_at(struct thread *td,
struct inotify_add_watch_at_args *uap)
{
- return (kern_inotify_add_watch(uap->fd, uap->dfd, uap->path,
- uap->mask, td));
+ return (kern_inotify_add_watch(td, uap->fd, uap->dfd, uap->path,
+ uap->mask));
}
int
-kern_inotify_rm_watch(int fd, uint32_t wd, struct thread *td)
+kern_inotify_rm_watch(struct thread *td, int fd, uint32_t wd)
{
struct file *fp;
struct inotify_softc *sc;
@@ -1052,5 +1052,5 @@ kern_inotify_rm_watch(int fd, uint32_t wd, struct thread *td)
int
sys_inotify_rm_watch(struct thread *td, struct inotify_rm_watch_args *uap)
{
- return (kern_inotify_rm_watch(uap->fd, uap->wd, td));
+ return (kern_inotify_rm_watch(td, uap->fd, uap->wd));
}
diff --git a/sys/sys/inotify.h b/sys/sys/inotify.h
index b8b4c67d9be2..dc36791e59d6 100644
--- a/sys/sys/inotify.h
+++ b/sys/sys/inotify.h
@@ -89,9 +89,9 @@ struct vnode;
int inotify_create_file(struct thread *, struct file *, int, int *);
void inotify_log(struct vnode *, const char *, size_t, int, __uint32_t);
-int kern_inotify_rm_watch(int, uint32_t, struct thread *);
-int kern_inotify_add_watch(int, int, const char *, uint32_t,
- struct thread *);
+int kern_inotify_rm_watch(struct thread *, int, uint32_t);
+int kern_inotify_add_watch(struct thread *, int, int, const char *,
+ uint32_t);
void vn_inotify(struct vnode *, struct vnode *, struct componentname *, int,
uint32_t);