summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/kernfs-internal.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-13 14:20:56 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-13 14:20:56 -0800
commit7653fe9d6cddc3fc5e4220608079006d8ac0054c (patch)
tree637f23e79a8956fe1a59faa62060ef369ab5f421 /fs/kernfs/kernfs-internal.h
parentf4b3e631b39db31f7375cce0b5e4111d14cde511 (diff)
downloadop-kernel-dev-7653fe9d6cddc3fc5e4220608079006d8ac0054c.zip
op-kernel-dev-7653fe9d6cddc3fc5e4220608079006d8ac0054c.tar.gz
Revert "kernfs: remove kernfs_addrm_cxt"
This reverts commit 99177a34110889a8f2c36420c34e3bcc9bfd8a70. Tejun writes: I'm sorry but can you please revert the whole series? get_active() waiting while a node is deactivated has potential to lead to deadlock and that deactivate/reactivate interface is something fundamentally flawed and that cgroup will have to work with the remove_self() like everybody else. IOW, I think the first posting was correct. Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/kernfs/kernfs-internal.h')
-rw-r--r--fs/kernfs/kernfs-internal.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h
index 4bc5784..e9ec38c 100644
--- a/fs/kernfs/kernfs-internal.h
+++ b/fs/kernfs/kernfs-internal.h
@@ -46,6 +46,13 @@ static inline struct kernfs_root *kernfs_root(struct kernfs_node *kn)
}
/*
+ * Context structure to be used while adding/removing nodes.
+ */
+struct kernfs_addrm_cxt {
+ struct kernfs_node *removed;
+};
+
+/*
* mount.c
*/
struct kernfs_super_info {
@@ -94,7 +101,10 @@ extern const struct inode_operations kernfs_dir_iops;
struct kernfs_node *kernfs_get_active(struct kernfs_node *kn);
void kernfs_put_active(struct kernfs_node *kn);
-int kernfs_add_one(struct kernfs_node *kn, struct kernfs_node *parent);
+void kernfs_addrm_start(struct kernfs_addrm_cxt *acxt);
+int kernfs_add_one(struct kernfs_addrm_cxt *acxt, struct kernfs_node *kn,
+ struct kernfs_node *parent);
+void kernfs_addrm_finish(struct kernfs_addrm_cxt *acxt);
struct kernfs_node *kernfs_new_node(struct kernfs_root *root, const char *name,
umode_t mode, unsigned flags);
OpenPOWER on IntegriCloud