/* do_sync_erase - run the erase worker synchronously. @ubi: UBI device description object  */
static int do_sync_erase(struct ubi_device *ubi, struct ubi_wl_entry *e, int vol_id, int lnum, int torture)
/* do_sync_erase - run the erase worker synchronously. @ubi: UBI device description object  */
static int do_sync_erase(struct ubi_device *ubi, struct ubi_wl_entry *e, int vol_id, int lnum, int torture)
{
	struct ubi_work *wl_wrk;
	dbg_wl("sync erase of PEB %i", e->pnum);
	wl_wrk = kmalloc(sizeof(struct ubi_work), GFP_NOFS);
	if (!wl_wrk)
		return -ENOMEM;
	wl_wrk->e = e;
	wl_wrk->vol_id = vol_id;
	wl_wrk->lnum = lnum;
	wl_wrk->torture = torture;
	return erase_worker(ubi, wl_wrk, 0);
}