Skip to content

Commit ce9b499

Browse files
committed
Revert "kernfs: remove unnecessary NULL check in __kernfs_remove()"
This reverts commit 88533f9. 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>
1 parent 88533f9 commit ce9b499

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎fs/kernfs/dir.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,9 @@ static void __kernfs_remove(struct kernfs_node *kn)
920920

921921
lockdep_assert_held(&kernfs_mutex);
922922

923+
if (!kn)
924+
return;
925+
923926
pr_debug("kernfs %s: removing\n", kn->name);
924927

925928
__kernfs_deactivate(kn);

0 commit comments

Comments
 (0)