mirror of https://github.com/schoebel/mars
all: earlier rot destruction
This commit is contained in:
parent
f9f2a421b8
commit
efbb44cf4b
|
@ -7001,6 +7001,17 @@ done:
|
|||
mars_remote_trigger(MARS_TRIGGER_TO_REMOTE);
|
||||
brick_msleep(1000);
|
||||
|
||||
down_write(&rot_sem);
|
||||
while (!list_empty(&rot_anchor)) {
|
||||
struct mars_rotate *rot;
|
||||
|
||||
rot = container_of(rot_anchor.next, struct mars_rotate, rot_head);
|
||||
up_write(&rot_sem);
|
||||
rot_destruct(rot);
|
||||
down_write(&rot_sem);
|
||||
}
|
||||
up_write(&rot_sem);
|
||||
|
||||
mars_free_dent_all(mars_global, &mars_global->dent_anchor);
|
||||
mars_kill_brick_all(mars_global, &mars_global->brick_anchor, false);
|
||||
|
||||
|
|
|
@ -2402,6 +2402,13 @@ void mars_free_dent(struct mars_global *global, struct mars_dent *dent)
|
|||
free_mars_global(dent->d_subtree);
|
||||
}
|
||||
|
||||
if (dent->d_private) {
|
||||
if (dent->d_private_destruct) {
|
||||
dent->d_private_destruct(dent->d_private);
|
||||
}
|
||||
brick_mem_free(dent->d_private);
|
||||
}
|
||||
|
||||
for (i = 0; i < MARS_ARGV_MAX; i++) {
|
||||
brick_string_free(dent->d_argv[i]);
|
||||
}
|
||||
|
@ -2413,12 +2420,6 @@ void mars_free_dent(struct mars_global *global, struct mars_dent *dent)
|
|||
brick_string_free(dent->new_link);
|
||||
if (dent->d_parent)
|
||||
dent->d_parent->d_child_count--;
|
||||
if (dent->d_private) {
|
||||
if (dent->d_private_destruct) {
|
||||
dent->d_private_destruct(dent->d_private);
|
||||
}
|
||||
brick_mem_free(dent->d_private);
|
||||
}
|
||||
brick_mem_free(dent);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mars_free_dent);
|
||||
|
|
Loading…
Reference in New Issue