Skip to content

Commit fe93446

Browse files
t-8chbrauner
authored andcommitted
vfs: use UAPI types for new struct delegation definition
Using libc types and headers from the UAPI headers is problematic as it introduces a dependency on a full C toolchain. Use the fixed-width integer types provided by the UAPI headers instead. Fixes: 1602bad ("vfs: expose delegation support to userland") Fixes: 4be9e04 ("vfs: add needed headers for new struct delegation definition") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://patch.msgid.link/20251203-uapi-fcntl-v1-1-490c67bf3425@linutronix.de Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 8cf01d0 commit fe93446

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

include/uapi/linux/fcntl.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44

55
#include <asm/fcntl.h>
66
#include <linux/openat2.h>
7-
#ifdef __KERNEL__
87
#include <linux/types.h>
9-
#else
10-
#include <stdint.h>
11-
#endif
128

139
#define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)
1410
#define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)
@@ -90,9 +86,9 @@
9086

9187
/* Argument structure for F_GETDELEG and F_SETDELEG */
9288
struct delegation {
93-
uint32_t d_flags; /* Must be 0 */
94-
uint16_t d_type; /* F_RDLCK, F_WRLCK, F_UNLCK */
95-
uint16_t __pad; /* Must be 0 */
89+
__u32 d_flags; /* Must be 0 */
90+
__u16 d_type; /* F_RDLCK, F_WRLCK, F_UNLCK */
91+
__u16 __pad; /* Must be 0 */
9692
};
9793

9894
/*

0 commit comments

Comments
 (0)