From: David Woodhouse <dwmw2@infradead.org>
Don't jump between contexts.
(don't write comprehensible changelogs, either).
case SIGKILL:
D1(printk(KERN_DEBUG "jffs2_garbage_collect_thread(): SIGKILL received.\n"));
- die:
- spin_lock(&c->erase_completion_lock);
- c->gc_task = NULL;
- spin_unlock(&c->erase_completion_lock);
- complete_and_exit(&c->gc_thread_exit, 0);
+ goto die;
case SIGHUP:
D1(printk(KERN_DEBUG "jffs2_garbage_collect_thread(): SIGHUP received.\n"));
goto die;
}
}
+ die:
+ spin_lock(&c->erase_completion_lock);
+ c->gc_task = NULL;
+ spin_unlock(&c->erase_completion_lock);
+ complete_and_exit(&c->gc_thread_exit, 0);
}
static int thread_should_wake(struct jffs2_sb_info *c)