diff options
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/inode.c b/fs/inode.c index bca0c618fdb3..54c63ce3de25 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/cdev.h> | 22 | #include <linux/cdev.h> |
23 | #include <linux/bootmem.h> | 23 | #include <linux/bootmem.h> |
24 | #include <linux/inotify.h> | 24 | #include <linux/inotify.h> |
25 | #include <linux/fsnotify.h> | ||
25 | #include <linux/mount.h> | 26 | #include <linux/mount.h> |
26 | #include <linux/async.h> | 27 | #include <linux/async.h> |
27 | 28 | ||
@@ -189,6 +190,10 @@ struct inode *inode_init_always(struct super_block *sb, struct inode *inode) | |||
189 | inode->i_private = NULL; | 190 | inode->i_private = NULL; |
190 | inode->i_mapping = mapping; | 191 | inode->i_mapping = mapping; |
191 | 192 | ||
193 | #ifdef CONFIG_FSNOTIFY | ||
194 | inode->i_fsnotify_mask = 0; | ||
195 | #endif | ||
196 | |||
192 | return inode; | 197 | return inode; |
193 | 198 | ||
194 | out_free_security: | 199 | out_free_security: |
@@ -221,6 +226,7 @@ void destroy_inode(struct inode *inode) | |||
221 | BUG_ON(inode_has_buffers(inode)); | 226 | BUG_ON(inode_has_buffers(inode)); |
222 | ima_inode_free(inode); | 227 | ima_inode_free(inode); |
223 | security_inode_free(inode); | 228 | security_inode_free(inode); |
229 | fsnotify_inode_delete(inode); | ||
224 | if (inode->i_sb->s_op->destroy_inode) | 230 | if (inode->i_sb->s_op->destroy_inode) |
225 | inode->i_sb->s_op->destroy_inode(inode); | 231 | inode->i_sb->s_op->destroy_inode(inode); |
226 | else | 232 | else |
@@ -252,6 +258,9 @@ void inode_init_once(struct inode *inode) | |||
252 | INIT_LIST_HEAD(&inode->inotify_watches); | 258 | INIT_LIST_HEAD(&inode->inotify_watches); |
253 | mutex_init(&inode->inotify_mutex); | 259 | mutex_init(&inode->inotify_mutex); |
254 | #endif | 260 | #endif |
261 | #ifdef CONFIG_FSNOTIFY | ||
262 | INIT_HLIST_HEAD(&inode->i_fsnotify_mark_entries); | ||
263 | #endif | ||
255 | } | 264 | } |
256 | EXPORT_SYMBOL(inode_init_once); | 265 | EXPORT_SYMBOL(inode_init_once); |
257 | 266 | ||