aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
diff options
context:
space:
mode:
authorXing Guo <[email protected]>2025-08-13 03:16:47 +0000
committerChristian Brauner <[email protected]>2025-09-02 08:34:37 +0000
commite51bd0e595476c1527bb0b4def095a6fd16b2563 (patch)
treebb8fb6b29f582842f87179785fbdfb200042ac42 /tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
parentMerge tag 'fuse-fixes-6.17-rc5' of ssh://gitolite.kernel.org/pub/scm/linux/ke... (diff)
downloadkernel-e51bd0e595476c1527bb0b4def095a6fd16b2563.tar.gz
kernel-e51bd0e595476c1527bb0b4def095a6fd16b2563.zip
selftests/fs/mount-notify: Fix compilation failure.
Commit c6d9775c2066 ("selftests/fs/mount-notify: build with tools include dir") introduces the struct __kernel_fsid_t to decouple dependency with headers_install. The commit forgets to define a macro for __kernel_fsid_t and it will cause type re-definition issue. Signed-off-by: Xing Guo <[email protected]> Link: https://lore.kernel.org/[email protected] Acked-by: Amir Goldstein <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c')
-rw-r--r--tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c b/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
index 63ce708d93ed..e4b7c2b457ee 100644
--- a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
+++ b/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
@@ -2,6 +2,13 @@
// Copyright (c) 2025 Miklos Szeredi <[email protected]>
#define _GNU_SOURCE
+
+// Needed for linux/fanotify.h
+typedef struct {
+ int val[2];
+} __kernel_fsid_t;
+#define __kernel_fsid_t __kernel_fsid_t
+
#include <fcntl.h>
#include <sched.h>
#include <stdio.h>
@@ -10,20 +17,12 @@
#include <sys/mount.h>
#include <unistd.h>
#include <sys/syscall.h>
+#include <sys/fanotify.h>
#include "../../kselftest_harness.h"
#include "../statmount/statmount.h"
#include "../utils.h"
-// Needed for linux/fanotify.h
-#ifndef __kernel_fsid_t
-typedef struct {
- int val[2];
-} __kernel_fsid_t;
-#endif
-
-#include <sys/fanotify.h>
-
static const char root_mntpoint_templ[] = "/tmp/mount-notify_test_root.XXXXXX";
static const int mark_cmds[] = {