Commit 8732dde8 authored by Joe Thornber's avatar Joe Thornber Committed by Greg Kroah-Hartman

[PATCH] dm: remove bogus yields

Replace a couple of bogus yields() with schedule() and io_schedule()
respectively.
parent 2ea58325
......@@ -730,8 +730,7 @@ static int wait_device_event(struct dm_ioctl *param, struct dm_ioctl *user)
dm_table_put(table);
dm_put(md);
yield();
set_current_state(TASK_RUNNING);
schedule();
out:
return results_to_user(user, param, NULL, 0);
......
......@@ -783,10 +783,9 @@ int dm_suspend(struct mapped_device *md)
if (!atomic_read(&md->pending))
break;
yield();
io_schedule();
}
current->state = TASK_RUNNING;
set_current_state(TASK_RUNNING);
down_write(&md->lock);
remove_wait_queue(&md->wait, &wait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment