aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-12-17 21:24:21 -0500
committerEric Paris <eparis@redhat.com>2010-07-28 09:58:49 -0400
commitb4e4e1407312ae5a267ed7d716e6d4e7120a8430 (patch)
tree2953d8885e3224955f1a5aca7c129709b26a059d /include
parent74766bbfa99adf8cb8119df6121851edba21c9d9 (diff)
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')
-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
363 void *data, int data_is, const char *name, 363 void *data, int data_is, const char *name,
364 u32 cookie, gfp_t gfp); 364 u32 cookie, gfp_t gfp);
365 365
366/* fanotify likes to change events after they are on lists... */
367extern struct fsnotify_event *fsnotify_clone_event(struct fsnotify_event *old_event);
368
366#else 369#else
367 370
368static inline void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, 371static inline void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,