[v2,09/14] fs: convert apparmorfs to use simple_remove() helper
diff mbox series

Message ID 20190516102641.6574-10-amir73il@gmail.com
State New
Headers show
Series
  • Sort out fsnotify_nameremove() mess
Related show

Commit Message

Amir Goldstein May 16, 2019, 10:26 a.m. UTC
This will allow generating fsnotify delete events after the
fsnotify_nameremove() hook is removed from d_delete().

Cc: John Johansen <john.johansen@canonical.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 security/apparmor/apparmorfs.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Patch
diff mbox series

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);