summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/kernfs/dir.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 3ac93737174a..9603c06550a0 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -177,9 +177,10 @@ void kernfs_put_active(struct kernfs_node *kn)
* kernfs_deactivate - deactivate kernfs_node
* @kn: kernfs_node to deactivate
*
- * Deny new active references and drain existing ones. Mutiple
- * removers may invoke this function concurrently on @kn and all will
- * return after deactivation and draining are complete.
+ * Deny new active references, drain existing ones and nuke all
+ * existing mmaps. Mutiple removers may invoke this function
+ * concurrently on @kn and all will return after deactivation and
+ * draining are complete.
*/
static void kernfs_deactivate(struct kernfs_node *kn)
__releases(&kernfs_mutex) __acquires(&kernfs_mutex)
@@ -213,6 +214,8 @@ static void kernfs_deactivate(struct kernfs_node *kn)
rwsem_release(&kn->dep_map, 1, _RET_IP_);
}
+ kernfs_unmap_bin_file(kn);
+
mutex_lock(&kernfs_mutex);
}
@@ -493,7 +496,6 @@ void kernfs_addrm_finish(struct kernfs_addrm_cxt *acxt)
acxt->removed = kn->u.removed_list;
- kernfs_unmap_bin_file(kn);
kernfs_put(kn);
}
}