This will allow generating fsnotify delete events after the fsnotify_nameremove() hook is removed from d_delete(). Cc: John Johansen <john.johansen@xxxxxxxxxxxxx> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> --- security/apparmor/apparmorfs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index 9ab5613fe07c..4a10acb4a6d3 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -351,11 +351,7 @@ static void aafs_remove(struct dentry *dentry) dir = d_inode(dentry->d_parent); inode_lock(dir); if (simple_positive(dentry)) { - if (d_is_dir(dentry)) - simple_rmdir(dir, dentry); - else - simple_unlink(dir, dentry); - d_delete(dentry); + simple_remove(dir, dentry); dput(dentry); } inode_unlock(dir); -- 2.17.1