Commit:     3972b7f67bf1a352a4a4c350b2245d759a41ea06
Parent:     1ae7075bcd805c3aa5e8f53effc63a4562d6110e
Author:     Florin Malita <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:24:18 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:14:59 2007 -0700

    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 <[EMAIL PROTECTED]>
    Acked-by: H. Peter Anvin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/devpts/inode.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 643e57b..06ef9a2 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -19,6 +19,7 @@
 #include <linux/tty.h>
 #include <linux/devpts_fs.h>
 #include <linux/parser.h>
+#include <linux/fsnotify.h>
 #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);
+       }
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to