fanotify.c (32a4df13b88afef2a7d869bb7586a7beba90961f) | fanotify.c (6e5f77b32e9097a8a68a8d453799676cacf70cad) |
---|---|
1#include <linux/fanotify.h> 2#include <linux/fdtable.h> 3#include <linux/fsnotify_backend.h> 4#include <linux/init.h> 5#include <linux/kernel.h> /* UINT_MAX */ 6#include <linux/mount.h> 7#include <linux/types.h> 8 --- 13 unchanged lines hidden (view full) --- 22 return true; 23 default: 24 BUG(); 25 }; 26 } 27 return false; 28} 29 | 1#include <linux/fanotify.h> 2#include <linux/fdtable.h> 3#include <linux/fsnotify_backend.h> 4#include <linux/init.h> 5#include <linux/kernel.h> /* UINT_MAX */ 6#include <linux/mount.h> 7#include <linux/types.h> 8 --- 13 unchanged lines hidden (view full) --- 22 return true; 23 default: 24 BUG(); 25 }; 26 } 27 return false; 28} 29 |
30static int fanotify_merge(struct list_head *list, struct fsnotify_event *event) | 30static int fanotify_merge(struct list_head *list, 31 struct fsnotify_event *event, 32 void **arg) |
31{ 32 struct fsnotify_event_holder *test_holder; 33 struct fsnotify_event *test_event; 34 struct fsnotify_event *new_event; 35 int ret = 0; 36 37 pr_debug("%s: list=%p event=%p\n", __func__, list, event); 38 --- 48 unchanged lines hidden (view full) --- 87 BUILD_BUG_ON(FAN_CLOSE_NOWRITE != FS_CLOSE_NOWRITE); 88 BUILD_BUG_ON(FAN_CLOSE_WRITE != FS_CLOSE_WRITE); 89 BUILD_BUG_ON(FAN_OPEN != FS_OPEN); 90 BUILD_BUG_ON(FAN_EVENT_ON_CHILD != FS_EVENT_ON_CHILD); 91 BUILD_BUG_ON(FAN_Q_OVERFLOW != FS_Q_OVERFLOW); 92 93 pr_debug("%s: group=%p event=%p\n", __func__, group, event); 94 | 33{ 34 struct fsnotify_event_holder *test_holder; 35 struct fsnotify_event *test_event; 36 struct fsnotify_event *new_event; 37 int ret = 0; 38 39 pr_debug("%s: list=%p event=%p\n", __func__, list, event); 40 --- 48 unchanged lines hidden (view full) --- 89 BUILD_BUG_ON(FAN_CLOSE_NOWRITE != FS_CLOSE_NOWRITE); 90 BUILD_BUG_ON(FAN_CLOSE_WRITE != FS_CLOSE_WRITE); 91 BUILD_BUG_ON(FAN_OPEN != FS_OPEN); 92 BUILD_BUG_ON(FAN_EVENT_ON_CHILD != FS_EVENT_ON_CHILD); 93 BUILD_BUG_ON(FAN_Q_OVERFLOW != FS_Q_OVERFLOW); 94 95 pr_debug("%s: group=%p event=%p\n", __func__, group, event); 96 |
95 ret = fsnotify_add_notify_event(group, event, NULL, fanotify_merge); | 97 ret = fsnotify_add_notify_event(group, event, NULL, fanotify_merge, NULL); |
96 /* -EEXIST means this event was merged with another, not that it was an error */ 97 if (ret == -EEXIST) 98 ret = 0; 99 return ret; 100} 101 102static bool should_send_vfsmount_event(struct fsnotify_group *group, struct vfsmount *mnt, 103 struct inode *inode, __u32 mask) --- 90 unchanged lines hidden --- | 98 /* -EEXIST means this event was merged with another, not that it was an error */ 99 if (ret == -EEXIST) 100 ret = 0; 101 return ret; 102} 103 104static bool should_send_vfsmount_event(struct fsnotify_group *group, struct vfsmount *mnt, 105 struct inode *inode, __u32 mask) --- 90 unchanged lines hidden --- |