| summaryrefslogtreecommitdiff |
| author | Joe Thornber <thornber@sistina.com> | 2003-07-02 02:41:21 (GMT) |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-07-02 02:41:21 (GMT) |
| commit | 8732dde80439eb2e2da2d9b792f77233196ed209 (patch) (side-by-side diff) | |
| tree | 639c83adf71971f07b9ff0a8fcda8b86f25510fe | |
| parent | 2ea58325e8b4b0c40b132dc02d037f69565c2769 (diff) | |
[PATCH] dm: remove bogus yields
Replace a couple of bogus yields() with schedule() and io_schedule()
respectively.
| -rw-r--r-- | drivers/md/dm-ioctl.c | 3 | ||||
| -rw-r--r-- | drivers/md/dm.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 2d7697c..744c327 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -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); diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 05e6ffc..2a9ae0a 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -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); |