aboutsummaryrefslogtreecommitdiff
path: root/fs/notify/fsnotify.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-09-24 22:45:01 -0700
committerAlex Shi <alex.shi@linaro.org>2017-09-24 22:45:01 -0700
commit1cfb9d628fa24c0a8b24cd604ae62dfa10a0d716 (patch)
tree4e57e7465ce5fbc2a6cc838fd78e5e8a2b9799ff /fs/notify/fsnotify.c
parentd595150285cf886cf2399fd74b0eeb43b444c706 (diff)
parent7ecc9777c5c76d7b31c376ffd4f59c4a85472a1b (diff)
Merge branch 'linux-linaro-lsk-v4.9' into v4.9/topic/ionv4.9/topic/ion
Diffstat (limited to 'fs/notify/fsnotify.c')
-rw-r--r--fs/notify/fsnotify.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index db39de2dd4cb..a64adc2fced9 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -104,16 +104,20 @@ int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
if (unlikely(!fsnotify_inode_watches_children(p_inode)))
__fsnotify_update_child_dentry_flags(p_inode);
else if (p_inode->i_fsnotify_mask & mask) {
+ struct name_snapshot name;
+
/* we are notifying a parent so come up with the new mask which
* specifies these are events which came from a child. */
mask |= FS_EVENT_ON_CHILD;
+ take_dentry_name_snapshot(&name, dentry);
if (path)
ret = fsnotify(p_inode, mask, path, FSNOTIFY_EVENT_PATH,
- dentry->d_name.name, 0);
+ name.name, 0);
else
ret = fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE,
- dentry->d_name.name, 0);
+ name.name, 0);
+ release_dentry_name_snapshot(&name);
}
dput(parent);