kernfs: implement kernfs_root->supers list
Currently, there's no way to find out which super_blocks are associated with a given kernfs_root. Let's implement it - the planned inotify extension to kernfs_notify() needs it. Make kernfs_super_info point back to the super_block and chain it at kernfs_root->supers. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a798c10faf
commit
7d568a8383
@@ -711,6 +711,7 @@ struct kernfs_root *kernfs_create_root(struct kernfs_syscall_ops *scops,
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
ida_init(&root->ino_ida);
|
||||
INIT_LIST_HEAD(&root->supers);
|
||||
|
||||
kn = __kernfs_new_node(root, "", S_IFDIR | S_IRUGO | S_IXUGO,
|
||||
KERNFS_DIR);
|
||||
|
||||
Reference in New Issue
Block a user