summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/kernfs/dir.c')
-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 4076e8a..a8028be 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);
OpenPOWER on IntegriCloud