diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-15 05:10:26 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-15 05:10:26 +0200 |
commit | 20445cc9159089d9d6b88d7864578efb10eb6590 (patch) | |
tree | fbbb27fd8baa82c77ebc4e020e8ee9ddb57e3ae2 /include/linux/fsnotify.h | |
parent | [PATCH] hostap: Use ieee80211 WLAN_FC_GET_{TYPE,STYPE} (diff) | |
parent | Merge /spare/repo/linux-2.6/ (diff) | |
download | linux-20445cc9159089d9d6b88d7864578efb10eb6590.tar.xz linux-20445cc9159089d9d6b88d7864578efb10eb6590.zip |
/spare/repo/netdev-2.6 branch 'ieee80211'
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r-- | include/linux/fsnotify.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index d07a92c94776..602c305c8585 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -21,7 +21,7 @@ */ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, const char *old_name, const char *new_name, - int isdir) + int isdir, struct inode *target) { u32 cookie = inotify_get_cookie(); @@ -36,31 +36,30 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, isdir = IN_ISDIR; inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name); inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name); + + if (target) { + inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL); + inotify_inode_is_dead(target); + } } /* - * fsnotify_unlink - file was unlinked + * fsnotify_nameremove - a filename was removed from a directory */ -static inline void fsnotify_unlink(struct dentry *dentry, struct inode *dir) +static inline void fsnotify_nameremove(struct dentry *dentry, int isdir) { - struct inode *inode = dentry->d_inode; - - inode_dir_notify(dir, DN_DELETE); - inotify_inode_queue_event(dir, IN_DELETE, 0, dentry->d_name.name); - inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); - - inotify_inode_is_dead(inode); + if (isdir) + isdir = IN_ISDIR; + dnotify_parent(dentry, DN_DELETE); + inotify_dentry_parent_queue_event(dentry, IN_DELETE|isdir, 0, dentry->d_name.name); } /* - * fsnotify_rmdir - directory was removed + * fsnotify_inoderemove - an inode is going away */ -static inline void fsnotify_rmdir(struct dentry *dentry, struct inode *inode, - struct inode *dir) +static inline void fsnotify_inoderemove(struct inode *inode) { - inode_dir_notify(dir, DN_DELETE); - inotify_inode_queue_event(dir,IN_DELETE|IN_ISDIR,0,dentry->d_name.name); - inotify_inode_queue_event(inode, IN_DELETE_SELF | IN_ISDIR, 0, NULL); + inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); inotify_inode_is_dead(inode); } |