56 lines
2.1 KiB
Diff
56 lines
2.1 KiB
Diff
|
From f37704d6cf69c9616dfd2aee5647b7941aa2bbaa Mon Sep 17 00:00:00 2001
|
||
|
From: Petr Vorel <petr.vorel@gmail.com>
|
||
|
Date: Sat, 16 Nov 2019 00:14:42 +0100
|
||
|
Subject: [PATCH] fanotify: Fix FSID_VAL_MEMBER() usage
|
||
|
|
||
|
This basically reverts part of 0498fc0a8.
|
||
|
|
||
|
FSID_VAL_MEMBER() wrapper was meant to be only for struct
|
||
|
fanotify_event_info_fid, it was used also for struct event_t
|
||
|
(which has also __kernel_fsid_t fsid, but shouldn't be redefined).
|
||
|
|
||
|
This caused error on recent musl v1.1.23 (with f67b3c17),
|
||
|
which has struct fanotify_event_info_fid.
|
||
|
|
||
|
Fixes: 0498fc0a8 ("fanotify: Detect val vs. __val
|
||
|
fanotify_event_info_fid.fsid member")
|
||
|
|
||
|
Acked-by: Jan Stancek <jstancek@redhat.com>
|
||
|
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
|
||
|
[Upstream status: f37704d6cf69c9616dfd2aee5647b7941aa2bbaa]
|
||
|
---
|
||
|
testcases/kernel/syscalls/fanotify/fanotify.h | 1 +
|
||
|
testcases/kernel/syscalls/fanotify/fanotify13.c | 4 ++--
|
||
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
|
||
|
index 5370e30bb..9c98aaa1d 100644
|
||
|
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
|
||
|
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
|
||
|
@@ -143,6 +143,7 @@ struct fanotify_event_info_fid {
|
||
|
};
|
||
|
#endif /* HAVE_STRUCT_FANOTIFY_EVENT_INFO_FID */
|
||
|
|
||
|
+/* NOTE: only for struct fanotify_event_info_fid */
|
||
|
#ifdef HAVE_STRUCT_FANOTIFY_EVENT_INFO_FID_FSID___VAL
|
||
|
# define FSID_VAL_MEMBER(fsid, i) (fsid.__val[i])
|
||
|
#else
|
||
|
diff --git a/testcases/kernel/syscalls/fanotify/fanotify13.c b/testcases/kernel/syscalls/fanotify/fanotify13.c
|
||
|
index 26212ab62..3d8de6009 100644
|
||
|
--- a/testcases/kernel/syscalls/fanotify/fanotify13.c
|
||
|
+++ b/testcases/kernel/syscalls/fanotify/fanotify13.c
|
||
|
@@ -130,8 +130,8 @@ static int setup_marks(unsigned int fd, struct test_case_t *tc)
|
||
|
"kernel");
|
||
|
return 1;
|
||
|
} else if (errno == ENODEV &&
|
||
|
- !FSID_VAL_MEMBER(event_set[i].fsid, 0) &&
|
||
|
- !FSID_VAL_MEMBER(event_set[i].fsid, 1)) {
|
||
|
+ !event_set[i].fsid.val[0] &&
|
||
|
+ !event_set[i].fsid.val[1]) {
|
||
|
tst_res(TCONF,
|
||
|
"FAN_REPORT_FID not supported on "
|
||
|
"filesystem type %s",
|
||
|
--
|
||
|
2.23.0
|
||
|
|