X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Ffsnotify.h;h=d4b7c4ac72e6dd70e9bbda61158b36847e83bb2a;hb=59957fc31fb78806fc95c99466caa9a0fff735aa;hp=2bd31fa623b6a7b12c3aa8ac9369cc698b0746d2;hpb=6e506079c80c96dc9f813491231433762fbad91d;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 2bd31fa623b..d4b7c4ac72e 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -91,6 +91,14 @@ static inline void fsnotify_inoderemove(struct inode *inode) inotify_inode_is_dead(inode); } +/* + * fsnotify_link_count - inode's link count changed + */ +static inline void fsnotify_link_count(struct inode *inode) +{ + inotify_inode_queue_event(inode, IN_ATTRIB, 0, NULL, NULL); +} + /* * fsnotify_create - 'name' was linked in */ @@ -102,6 +110,20 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) audit_inode_child(dentry->d_name.name, dentry, inode); } +/* + * fsnotify_link - new hardlink in 'inode' directory + * Note: We have to pass also the linked inode ptr as some filesystems leave + * new_dentry->d_inode NULL and instantiate inode pointer later + */ +static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct dentry *new_dentry) +{ + inode_dir_notify(dir, DN_CREATE); + inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name, + inode); + fsnotify_link_count(inode); + audit_inode_child(new_dentry->d_name.name, new_dentry, dir); +} + /* * fsnotify_mkdir - directory 'name' was created */