aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFlorin Malita <fmalita@gmail.com>2007-05-08 03:24:18 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:14:59 -0400
commit3972b7f67bf1a352a4a4c350b2245d759a41ea06 (patch)
tree40eab1b1e50c25a7a94e2ba8d7c920e5980eae7a /fs
parent1ae7075bcd805c3aa5e8f53effc63a4562d6110e (diff)
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 <fmalita@gmail.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/devpts/inode.c5
1 files changed, 4 insertions, 1 deletions
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 @@
19#include <linux/tty.h> 19#include <linux/tty.h>
20#include <linux/devpts_fs.h> 20#include <linux/devpts_fs.h>
21#include <linux/parser.h> 21#include <linux/parser.h>
22#include <linux/fsnotify.h>
22 23
23#define DEVPTS_SUPER_MAGIC 0x1cd1 24#define DEVPTS_SUPER_MAGIC 0x1cd1
24 25
@@ -178,8 +179,10 @@ int devpts_pty_new(struct tty_struct *tty)
178 inode->i_private = tty; 179 inode->i_private = tty;
179 180
180 dentry = get_node(number); 181 dentry = get_node(number);
181 if (!IS_ERR(dentry) && !dentry->d_inode) 182 if (!IS_ERR(dentry) && !dentry->d_inode) {
182 d_instantiate(dentry, inode); 183 d_instantiate(dentry, inode);
184 fsnotify_create(devpts_root->d_inode, dentry);
185 }
183 186
184 mutex_unlock(&devpts_root->d_inode->i_mutex); 187 mutex_unlock(&devpts_root->d_inode->i_mutex);
185 188