devpts: call fsnotify_unlink() hook
authorAmir Goldstein <amir73il@gmail.com>
Sun, 26 May 2019 14:34:06 +0000 (17:34 +0300)
committerJan Kara <jack@suse.cz>
Thu, 20 Jun 2019 12:46:34 +0000 (14:46 +0200)
This will allow generating fsnotify delete events after the
fsnotify_nameremove() hook is removed from d_delete().

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/devpts/inode.c

index 2c14ae044dcebe0d1498e964bb0d2642211b451e..beeadca23b05c85f5171c18d240f9580f496f1e4 100644 (file)
@@ -621,6 +621,7 @@ void devpts_pty_kill(struct dentry *dentry)
 
        dentry->d_fsdata = NULL;
        drop_nlink(dentry->d_inode);
+       fsnotify_unlink(d_inode(dentry->d_parent), dentry);
        d_delete(dentry);
        dput(dentry);   /* d_alloc_name() in devpts_pty_new() */
 }