aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fsnotify.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r--include/linux/fsnotify.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index e96a4306ab3b..602c305c8585 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -44,28 +44,22 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
44} 44}
45 45
46/* 46/*
47 * fsnotify_unlink - file was unlinked 47 * fsnotify_nameremove - a filename was removed from a directory
48 */ 48 */
49static inline void fsnotify_unlink(struct dentry *dentry, struct inode *dir) 49static inline void fsnotify_nameremove(struct dentry *dentry, int isdir)
50{ 50{
51 struct inode *inode = dentry->d_inode; 51 if (isdir)
52 52 isdir = IN_ISDIR;
53 inode_dir_notify(dir, DN_DELETE); 53 dnotify_parent(dentry, DN_DELETE);
54 inotify_inode_queue_event(dir, IN_DELETE, 0, dentry->d_name.name); 54 inotify_dentry_parent_queue_event(dentry, IN_DELETE|isdir, 0, dentry->d_name.name);
55 inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL);
56
57 inotify_inode_is_dead(inode);
58} 55}
59 56
60/* 57/*
61 * fsnotify_rmdir - directory was removed 58 * fsnotify_inoderemove - an inode is going away
62 */ 59 */
63static inline void fsnotify_rmdir(struct dentry *dentry, struct inode *inode, 60static inline void fsnotify_inoderemove(struct inode *inode)
64 struct inode *dir)
65{ 61{
66 inode_dir_notify(dir, DN_DELETE); 62 inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL);
67 inotify_inode_queue_event(dir,IN_DELETE|IN_ISDIR,0,dentry->d_name.name);
68 inotify_inode_queue_event(inode, IN_DELETE_SELF | IN_ISDIR, 0, NULL);
69 inotify_inode_is_dead(inode); 63 inotify_inode_is_dead(inode);
70} 64}
71 65