summaryrefslogtreecommitdiffstats
path: root/fs/kernfs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-13 13:50:31 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-13 13:50:31 -0800
commitce9b499c9f58d7f3f680413f3ab5407f4e647ba2 (patch)
tree9cb329a1231a1f971e6c18ff472090872adb8da2 /fs/kernfs
parent88533f990c616cf50c2fe585ea03f75c806a293d (diff)
downloadlinux-stable-ce9b499c9f58d7f3f680413f3ab5407f4e647ba2.tar.gz
linux-stable-ce9b499c9f58d7f3f680413f3ab5407f4e647ba2.tar.bz2
linux-stable-ce9b499c9f58d7f3f680413f3ab5407f4e647ba2.zip
Revert "kernfs: remove unnecessary NULL check in __kernfs_remove()"
This reverts commit 88533f990c616cf50c2fe585ea03f75c806a293d. 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')
-rw-r--r--fs/kernfs/dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 4076e8a7c269..a8028be6cdb7 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -920,6 +920,9 @@ static void __kernfs_remove(struct kernfs_node *kn)
lockdep_assert_held(&kernfs_mutex);
+ if (!kn)
+ return;
+
pr_debug("kernfs %s: removing\n", kn->name);
__kernfs_deactivate(kn);