summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-04-09 11:07:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-17 16:23:19 -0700
commit0b2332fbef1df5db5ed85fb1812aca9d50aa6415 (patch)
tree4c2e7efc58e87c0a4c0a9cff698ea8e07d089966 /include
parentf1a6b5ddc318c0722e70715ef3a53e53981d606c (diff)
kernfs: implement kernfs_root->supers list
commit 7d568a8383bbb9c1f5167781075906acb2bb1550 upstream. 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> [lizf: Backported to 3.15: Adjust context] Signed-off-by: Li Zefan <lizefan@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kernfs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index 52bf5677db0b..17aa1cce6f8e 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -161,6 +161,10 @@ struct kernfs_root {
/* private fields, do not use outside kernfs proper */
struct ida ino_ida;
struct kernfs_syscall_ops *syscall_ops;
+
+ /* list of kernfs_super_info of this root, protected by kernfs_mutex */
+ struct list_head supers;
+
wait_queue_head_t deactivate_waitq;
};