From: Florin Malita Date: Tue, 8 May 2007 07:24:18 +0000 (-0700) Subject: devpts: add fsnotify create event X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3972b7f67bf1a352a4a4c350b2245d759a41ea06;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git devpts: add fsnotify create event Currently, devpts doesn't generate an fsnotify event upon pts creation because the regular vfs paths aren't involved. Deallocation, on the other hand, correctly generates a nameremove event thanks to the d_delete() invocation in devpts_pty_kill(). This patch adds the missing fsnotify_create() trigger in devpts_pty_new(). Signed-off-by: Florin Malita Acked-by: H. Peter Anvin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 643e57b622bd..06ef9a255c76 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -19,6 +19,7 @@ #include #include #include +#include #define DEVPTS_SUPER_MAGIC 0x1cd1 @@ -178,8 +179,10 @@ int devpts_pty_new(struct tty_struct *tty) inode->i_private = tty; dentry = get_node(number); - if (!IS_ERR(dentry) && !dentry->d_inode) + if (!IS_ERR(dentry) && !dentry->d_inode) { d_instantiate(dentry, inode); + fsnotify_create(devpts_root->d_inode, dentry); + } mutex_unlock(&devpts_root->d_inode->i_mutex);