summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/dir.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-04-09 11:07:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-25 11:43:31 -0700
commit7d568a8383bbb9c1f5167781075906acb2bb1550 (patch)
treef25a2d70ce8851e991a53ed6391c899320f097a6 /fs/kernfs/dir.c
parenta798c10faf62a505d24e5f6213fbaf904a39623f (diff)
downloadlinux-stable-7d568a8383bbb9c1f5167781075906acb2bb1550.tar.gz
linux-stable-7d568a8383bbb9c1f5167781075906acb2bb1550.tar.bz2
linux-stable-7d568a8383bbb9c1f5167781075906acb2bb1550.zip
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>
Diffstat (limited to 'fs/kernfs/dir.c')
-rw-r--r--fs/kernfs/dir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 78f3403300af..43aa97988c31 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -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);