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) ...@@ -730,8 +730,7 @@ static int wait_device_event(struct dm_ioctl *param, struct dm_ioctl *user)
dm_table_put(table); dm_table_put(table);
dm_put(md); dm_put(md);
yield(); schedule();
set_current_state(TASK_RUNNING);
out: out:
return results_to_user(user, param, NULL, 0); return results_to_user(user, param, NULL, 0);
......
...@@ -783,10 +783,9 @@ int dm_suspend(struct mapped_device *md) ...@@ -783,10 +783,9 @@ int dm_suspend(struct mapped_device *md)
if (!atomic_read(&md->pending)) if (!atomic_read(&md->pending))
break; break;
yield(); io_schedule();
} }
set_current_state(TASK_RUNNING);
current->state = TASK_RUNNING;
down_write(&md->lock); down_write(&md->lock);
remove_wait_queue(&md->wait, &wait); 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