190586523SEric Paris #ifndef __FS_NOTIFY_FSNOTIFY_H_ 290586523SEric Paris #define __FS_NOTIFY_FSNOTIFY_H_ 390586523SEric Paris 490586523SEric Paris #include <linux/list.h> 590586523SEric Paris #include <linux/fsnotify.h> 690586523SEric Paris #include <linux/srcu.h> 790586523SEric Paris #include <linux/types.h> 890586523SEric Paris 9a2d8bc6cSEric Paris /* destroy all events sitting in this groups notification queue */ 10a2d8bc6cSEric Paris extern void fsnotify_flush_notify(struct fsnotify_group *group); 11a2d8bc6cSEric Paris 1275c1be48SEric Paris /* protects reads of inode and vfsmount marks list */ 1375c1be48SEric Paris extern struct srcu_struct fsnotify_mark_srcu; 1475c1be48SEric Paris 15*8edc6e16SJan Kara /* compare two groups for sorting of marks lists */ 16*8edc6e16SJan Kara extern int fsnotify_compare_groups(struct fsnotify_group *a, 17*8edc6e16SJan Kara struct fsnotify_group *b); 18*8edc6e16SJan Kara 1990b1e7a5SEric Paris extern void fsnotify_set_inode_mark_mask_locked(struct fsnotify_mark *fsn_mark, 2090b1e7a5SEric Paris __u32 mask); 215444e298SEric Paris /* add a mark to an inode */ 225444e298SEric Paris extern int fsnotify_add_inode_mark(struct fsnotify_mark *mark, 235444e298SEric Paris struct fsnotify_group *group, struct inode *inode, 245444e298SEric Paris int allow_dups); 250d48b7f0SEric Paris /* add a mark to a vfsmount */ 260d48b7f0SEric Paris extern int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark, 270d48b7f0SEric Paris struct fsnotify_group *group, struct vfsmount *mnt, 280d48b7f0SEric Paris int allow_dups); 295444e298SEric Paris 300d48b7f0SEric Paris /* vfsmount specific destruction of a mark */ 310d48b7f0SEric Paris extern void fsnotify_destroy_vfsmount_mark(struct fsnotify_mark *mark); 325444e298SEric Paris /* inode specific destruction of a mark */ 335444e298SEric Paris extern void fsnotify_destroy_inode_mark(struct fsnotify_mark *mark); 343be25f49SEric Paris /* run the list of all marks associated with inode and flag them to be freed */ 353be25f49SEric Paris extern void fsnotify_clear_marks_by_inode(struct inode *inode); 36ca9c726eSAndreas Gruenbacher /* run the list of all marks associated with vfsmount and flag them to be freed */ 37ca9c726eSAndreas Gruenbacher extern void fsnotify_clear_marks_by_mount(struct vfsmount *mnt); 38c28f7e56SEric Paris /* 39c28f7e56SEric Paris * update the dentry->d_flags of all of inode's children to indicate if inode cares 40c28f7e56SEric Paris * about events that happen to its children. 41c28f7e56SEric Paris */ 42c28f7e56SEric Paris extern void __fsnotify_update_child_dentry_flags(struct inode *inode); 43a2d8bc6cSEric Paris 44a2d8bc6cSEric Paris /* allocate and destroy and event holder to attach events to notification/access queues */ 45a2d8bc6cSEric Paris extern struct fsnotify_event_holder *fsnotify_alloc_event_holder(void); 46a2d8bc6cSEric Paris extern void fsnotify_destroy_event_holder(struct fsnotify_event_holder *holder); 47a2d8bc6cSEric Paris 4890586523SEric Paris #endif /* __FS_NOTIFY_FSNOTIFY_H_ */ 49