aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-12-17 21:24:34 -0500
committerEric Paris <eparis@redhat.com>2010-07-28 09:59:00 -0400
commit4d92604cc90aa18bbbe0f6e23b7a9fdb612836d3 (patch)
treec04b26fb38a8524fa5e204cb9e40870afa9823f9 /include/linux
parentc9778a98e7440fb73e0d27b8155a688663a0d493 (diff)
fanotify: clear all fanotify marks
fanotify listeners may want to clear all marks. They may want to do this to destroy all of their inode marks which have nothing but ignores. Realistically this is useful for av vendors who update policy and want to clear all of their cached allows. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fanotify.h1
-rw-r--r--include/linux/fsnotify_backend.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h
index e43934d0b74c..385896c9f828 100644
--- a/include/linux/fanotify.h
+++ b/include/linux/fanotify.h
@@ -32,6 +32,7 @@
32#define FAN_MARK_MOUNT 0x00000010 32#define FAN_MARK_MOUNT 0x00000010
33#define FAN_MARK_IGNORED_MASK 0x00000020 33#define FAN_MARK_IGNORED_MASK 0x00000020
34#define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040 34#define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040
35#define FAN_MARK_FLUSH 0x00000080
35 36
36#define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\ 37#define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\
37 FAN_MARK_REMOVE |\ 38 FAN_MARK_REMOVE |\
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 8ca19df8a171..be4a36ed2008 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -384,6 +384,12 @@ extern int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *
384 struct inode *inode, struct vfsmount *mnt, int allow_dups); 384 struct inode *inode, struct vfsmount *mnt, int allow_dups);
385/* given a mark, flag it to be freed when all references are dropped */ 385/* given a mark, flag it to be freed when all references are dropped */
386extern void fsnotify_destroy_mark(struct fsnotify_mark *mark); 386extern void fsnotify_destroy_mark(struct fsnotify_mark *mark);
387/* run all the marks in a group, and clear all of the vfsmount marks */
388extern void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group);
389/* run all the marks in a group, and clear all of the inode marks */
390extern void fsnotify_clear_inode_marks_by_group(struct fsnotify_group *group);
391/* run all the marks in a group, and clear all of the marks where mark->flags & flags is true*/
392extern void fsnotify_clear_marks_by_group_flags(struct fsnotify_group *group, unsigned int flags);
387/* run all the marks in a group, and flag them to be freed */ 393/* run all the marks in a group, and flag them to be freed */
388extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group); 394extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group);
389extern void fsnotify_get_mark(struct fsnotify_mark *mark); 395extern void fsnotify_get_mark(struct fsnotify_mark *mark);