mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
fsnotify: add marks to inodes so groups can interpret how to handle those inodes
This patch creates a way for fsnotify groups to attach marks to inodes. These marks have little meaning to the generic fsnotify infrastructure and thus their meaning should be interpreted by the group that attached them to the inode's list. dnotify and inotify will make use of these markings to indicate which inodes are of interest to their respective groups. But this implementation has the useful property that in the future other listeners could actually use the marks for the exact opposite reason, aka to indicate which inodes it had NO interest in. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
90586523eb
commit
3be25f49b9
9 changed files with 483 additions and 3 deletions
|
@ -99,6 +99,14 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
|
|||
audit_inode_child(new_name, moved, new_dir);
|
||||
}
|
||||
|
||||
/*
|
||||
* fsnotify_inode_delete - and inode is being evicted from cache, clean up is needed
|
||||
*/
|
||||
static inline void fsnotify_inode_delete(struct inode *inode)
|
||||
{
|
||||
__fsnotify_inode_delete(inode);
|
||||
}
|
||||
|
||||
/*
|
||||
* fsnotify_nameremove - a filename was removed from a directory
|
||||
*/
|
||||
|
@ -121,6 +129,7 @@ static inline void fsnotify_inoderemove(struct inode *inode)
|
|||
inotify_inode_is_dead(inode);
|
||||
|
||||
fsnotify(inode, FS_DELETE_SELF, inode, FSNOTIFY_EVENT_INODE);
|
||||
__fsnotify_inode_delete(inode);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue