Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Thornber <thornber@sistina.com>2003-07-01 19:41:21 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2003-07-01 19:41:21 -0700
commit8732dde80439eb2e2da2d9b792f77233196ed209 (patch)
tree639c83adf71971f07b9ff0a8fcda8b86f25510fe
parent2ea58325e8b4b0c40b132dc02d037f69565c2769 (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.c3
-rw-r--r--drivers/md/dm.c5
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 2d7697c4624c..744c3273e6e3 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 05e6ffc49d3e..2a9ae0ab6823 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);