diff options
Diffstat (limited to 'fs/notify/inode_mark.c')
-rw-r--r-- | fs/notify/inode_mark.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index cdc154146974..a39534845b28 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c | |||
@@ -131,6 +131,8 @@ void fsnotify_recalc_inode_mask(struct inode *inode) | |||
131 | spin_lock(&inode->i_lock); | 131 | spin_lock(&inode->i_lock); |
132 | fsnotify_recalc_inode_mask_locked(inode); | 132 | fsnotify_recalc_inode_mask_locked(inode); |
133 | spin_unlock(&inode->i_lock); | 133 | spin_unlock(&inode->i_lock); |
134 | |||
135 | __fsnotify_update_child_dentry_flags(inode); | ||
134 | } | 136 | } |
135 | 137 | ||
136 | /* | 138 | /* |
@@ -190,6 +192,19 @@ void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry) | |||
190 | group->ops->freeing_mark(entry, group); | 192 | group->ops->freeing_mark(entry, group); |
191 | 193 | ||
192 | /* | 194 | /* |
195 | * __fsnotify_update_child_dentry_flags(inode); | ||
196 | * | ||
197 | * I really want to call that, but we can't, we have no idea if the inode | ||
198 | * still exists the second we drop the entry->lock. | ||
199 | * | ||
200 | * The next time an event arrive to this inode from one of it's children | ||
201 | * __fsnotify_parent will see that the inode doesn't care about it's | ||
202 | * children and will update all of these flags then. So really this | ||
203 | * is just a lazy update (and could be a perf win...) | ||
204 | */ | ||
205 | |||
206 | |||
207 | /* | ||
193 | * it's possible that this group tried to destroy itself, but this | 208 | * it's possible that this group tried to destroy itself, but this |
194 | * this mark was simultaneously being freed by inode. If that's the | 209 | * this mark was simultaneously being freed by inode. If that's the |
195 | * case, we finish freeing the group here. | 210 | * case, we finish freeing the group here. |
@@ -323,6 +338,8 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry, | |||
323 | if (lentry) { | 338 | if (lentry) { |
324 | ret = -EEXIST; | 339 | ret = -EEXIST; |
325 | fsnotify_put_mark(lentry); | 340 | fsnotify_put_mark(lentry); |
341 | } else { | ||
342 | __fsnotify_update_child_dentry_flags(inode); | ||
326 | } | 343 | } |
327 | 344 | ||
328 | return ret; | 345 | return ret; |