* 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)
rwsem_release(&kn->dep_map, 1, _RET_IP_);
}
+ kernfs_unmap_bin_file(kn);
+
mutex_lock(&kernfs_mutex);
}
acxt->removed = kn->u.removed_list;
- kernfs_unmap_bin_file(kn);
kernfs_put(kn);
}
}