summaryrefslogtreecommitdiffstats
path: root/include/linux/fsnotify_backend.h
diff options
context:
space:
mode:
authorEric Paris2009-12-18 03:24:21 +0100
committerEric Paris2010-07-28 15:58:49 +0200
commitb4e4e1407312ae5a267ed7d716e6d4e7120a8430 (patch)
tree2953d8885e3224955f1a5aca7c129709b26a059d /include/linux/fsnotify_backend.h
parentfsnotify: per group notification queue merge types (diff)
downloadkernel-qcow2-linux-b4e4e1407312ae5a267ed7d716e6d4e7120a8430.tar.gz
kernel-qcow2-linux-b4e4e1407312ae5a267ed7d716e6d4e7120a8430.tar.xz
kernel-qcow2-linux-b4e4e1407312ae5a267ed7d716e6d4e7120a8430.zip
fsnotify: clone existing events
fsnotify_clone_event will take an event, clone it, and return the cloned event to the caller. Since events may be in use by multiple fsnotify groups simultaneously certain event entries (such as the mask) cannot be changed after the event was created. Since fanotify would like to merge events happening on the same file it needs a new clean event to work with so it can change any fields it wishes. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux/fsnotify_backend.h')
-rw-r--r--include/linux/fsnotify_backend.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 25789d45fad8..3a7fff235539 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -363,6 +363,9 @@ extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32
void *data, int data_is, const char *name,
u32 cookie, gfp_t gfp);
+/* fanotify likes to change events after they are on lists... */
+extern struct fsnotify_event *fsnotify_clone_event(struct fsnotify_event *old_event);
+
#else
static inline void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,