/* This function is called if the journal is full enough to make a commit worthwhile, so background thread is kicked to start it.  */
void ubifs_request_bg_commit(struct ubifs_info *c)
/* This function is called if the journal is full enough to make a commit worthwhile, so background thread is kicked to start it.  */
void ubifs_request_bg_commit(struct ubifs_info *c)
{
	spin_lock(&c->cs_lock);
	if (c->cmt_state == COMMIT_RESTING) {
		dbg_cmt("old: %s, new: %s", dbg_cstate(c->cmt_state),
			dbg_cstate(COMMIT_BACKGROUND));
		c->cmt_state = COMMIT_BACKGROUND;
		spin_unlock(&c->cs_lock);
		ubifs_wake_up_bgt(c);
	} else
		spin_unlock(&c->cs_lock);
}