infra: fix dent mem leak

This commit is contained in:
Thomas Schoebel-Theuer 2019-11-08 17:59:40 +01:00
parent 44e9e3d062
commit f7223f8c22
1 changed files with 3 additions and 7 deletions

View File

@ -1749,13 +1749,9 @@ EXPORT_SYMBOL_GPL(mars_find_dent);
void mars_kill_dent(struct mars_global *global, struct mars_dent *dent)
{
if (global)
down_write(&global->dent_mutex);
list_del_init(&dent->dent_link);
list_del_init(&dent->dent_hash_link);
list_del_init(&dent->dent_quick_link);
if (global)
up_write(&global->dent_mutex);
/* Only mark as killable.
* Removal from the lists is done at mars_free_dent_all().
*/
dent->d_killme = true;
mars_kill_brick_all(global, &dent->brick_list, true);
}