[LTP] [PATCH v5 3/7] fs: add file_setattr/file_getattr fallback definitions

Cyril Hrubis chrubis@suse.cz
Wed Aug 6 17:36:00 CEST 2025


Hi!
> +#define FILE_ATTR_SIZE_VER0 24
> +#define FILE_ATTR_SIZE_LATEST FILE_ATTR_SIZE_VER0
> +
> +static inline int file_getattr(int dfd, const char *filename,
> +			    struct file_attr *ufattr, size_t usize,
> +			    unsigned int at_flags)
> +{
> +	return tst_syscall(__NR_file_getattr, dfd, filename, ufattr, usize,
> +		    at_flags);
> +}
> +
> +static inline int file_setattr(int dfd, const char *filename,
> +			    struct file_attr *ufattr, size_t usize,
> +			    unsigned int at_flags)
> +{
> +	return tst_syscall(__NR_file_setattr, dfd, filename, ufattr, usize,
> +		    at_flags);
> +}

I wonder if we need configure checks for these (i.e. if glibc is going
to add these as syscall wrappers) but I guess we can add them later on
when needed.

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list