mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
configfs: call fsnotify_rmdir() hook
This will allow generating fsnotify delete events on unregister
of group/subsystem after the fsnotify_nameremove() hook is removed
from d_delete().
The rest of the d_delete() calls from this filesystem are either
called recursively from within debugfs_unregister_{group,subsystem},
called from a vfs function that already has delete hooks or are
called from shutdown/cleanup code.
Cc: Joel Becker <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
This commit is contained in:
parent
6679ea6dea
commit
6146e78c03
1 changed files with 3 additions and 0 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#undef DEBUG
|
||||
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fsnotify.h>
|
||||
#include <linux/mount.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
@ -1804,6 +1805,7 @@ void configfs_unregister_group(struct config_group *group)
|
|||
configfs_detach_group(&group->cg_item);
|
||||
d_inode(dentry)->i_flags |= S_DEAD;
|
||||
dont_mount(dentry);
|
||||
fsnotify_rmdir(d_inode(parent), dentry);
|
||||
d_delete(dentry);
|
||||
inode_unlock(d_inode(parent));
|
||||
|
||||
|
|
@ -1932,6 +1934,7 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys)
|
|||
configfs_detach_group(&group->cg_item);
|
||||
d_inode(dentry)->i_flags |= S_DEAD;
|
||||
dont_mount(dentry);
|
||||
fsnotify_rmdir(d_inode(root), dentry);
|
||||
inode_unlock(d_inode(dentry));
|
||||
|
||||
d_delete(dentry);
|
||||
|
|
|
|||
Loading…
Reference in a new issue