summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-07-31 10:31:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-07-31 10:31:00 -0700
commitd6084bb815c453de27af8071a23163a711586a6c (patch)
tree6993863d3f6a2aa3cd87661104b8cdb0ec84623f /samples
parent440e6d7e1435bb1e1948eeae34ca8bef6c7c5f82 (diff)
parent0d4c4d4ea443babab6ec1a79f481260963fc969a (diff)
Merge tag 'fsnotify_for_v6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull fsnotify updates from Jan Kara: "A couple of small improvements for fsnotify subsystem. The most interesting is probably Amir's change modifying the meaning of fsnotify fmode bits (and I spell it out specifically because I know you care about those). There's no change for the common cases of no fsnotify watches or no permission event watches. But when there are permission watches (either for open or for pre-content events) but no FAN_ACCESS_PERM watch (which nobody uses in practice) we are now able optimize away unnecessary cache loads from the read path" * tag 'fsnotify_for_v6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: optimize FMODE_NONOTIFY_PERM for the common cases fsnotify: merge file_set_fsnotify_mode_from_watchers() with open perm hook samples: fix building fs-monitor on musl systems fanotify: sanitize handle_type values when reporting fid
Diffstat (limited to 'samples')
-rw-r--r--samples/fanotify/fs-monitor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/samples/fanotify/fs-monitor.c b/samples/fanotify/fs-monitor.c
index 608db24c471e..28c0a652ffeb 100644
--- a/samples/fanotify/fs-monitor.c
+++ b/samples/fanotify/fs-monitor.c
@@ -12,6 +12,9 @@
#include <sys/fanotify.h>
#include <sys/types.h>
#include <unistd.h>
+#ifndef __GLIBC__
+#include <asm-generic/int-ll64.h>
+#endif
#ifndef FAN_FS_ERROR
#define FAN_FS_ERROR 0x00008000
@@ -95,7 +98,11 @@ static void handle_notifications(char *buffer, int len)
fid = (struct fanotify_event_info_fid *) info;
printf("\tfsid: %x%x\n",
+#if defined(__GLIBC__)
fid->fsid.val[0], fid->fsid.val[1]);
+#else
+ fid->fsid.__val[0], fid->fsid.__val[1]);
+#endif
print_fh((struct file_handle *) &fid->handle);
break;