[PATCH 13/13] Add FD_PIDFS_ROOT from Linux 6.17 to bits/fcntl-linux.h

Carlos O'Donell carlos@redhat.com
Tue Nov 4 17:08:29 GMT 2025


On 10/3/25 3:39 PM, Adhemerval Zanella wrote:
> It was added by commit 3941e37f62fe2c3c8b8675c12183185f20450539

LGTM.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>   sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> index 16c83e3349..f9b3de11f4 100644
> --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> @@ -219,6 +219,9 @@
>   
>   /* For F_[GET|SET]FD.  */
>   #define FD_CLOEXEC	1	/* Actually anything with low bit set goes */
> +#ifdef __USE_GNU
> +# define FD_PIDFS_ROOT	-10002	/* Root of the pidfs filesystem */

OK. Value matches.

commit cd5d2006327b6d8488612cb8c03ad7304417c8f2
Author: Christian Brauner <brauner@kernel.org>
Date:   Tue Jun 24 10:29:10 2025 +0200

     uapi/fcntl: add FD_INVALID
     
     Add a marker for an invalid file descriptor.
     
     Link: https://lore.kernel.org/20250624-work-pidfs-fhandle-v2-7-d02a04858fe3@kernel.org
     Reviewed-by: Jan Kara <jack@suse.cz>
     Reviewed-by: Amir Goldstein <amir73il@gmail.com>
     Signed-off-by: Christian Brauner <brauner@kernel.org>

Missing FD_INVALID, but we can do that later.

I think it would be valuable to have for parity/test purposes?

Notes:
- Latest v6.18-rc will have FD_NFS_ROOT.

> +#endif
>   
>   #ifndef F_RDLCK
>   /* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */


-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list