summaryrefslogtreecommitdiff
path: root/include/linux/fsnotify_backend.h
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-12-18 05:24:21 +0300
committerEric Paris <eparis@redhat.com>2010-07-28 17:58:49 +0400
commitb4e4e1407312ae5a267ed7d716e6d4e7120a8430 (patch)
tree2953d8885e3224955f1a5aca7c129709b26a059d /include/linux/fsnotify_backend.h
parent74766bbfa99adf8cb8119df6121851edba21c9d9 (diff)
downloadlinux-b4e4e1407312ae5a267ed7d716e6d4e7120a8430.tar.xz
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,