]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] dm: remove bogus yields
authorJoe Thornber <thornber@sistina.com>
Wed, 2 Jul 2003 02:41:21 +0000 (19:41 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 2 Jul 2003 02:41:21 +0000 (19:41 -0700)
Replace a couple of bogus yields() with schedule() and io_schedule()
respectively.

drivers/md/dm-ioctl.c
drivers/md/dm.c

index 2d7697c4624cac75782073367e5ab84a011eb830..744c3273e6e30117eb1832b541d42c221711ff05 100644 (file)
@@ -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);
index 05e6ffc49d3e39178f6f1a0f3e61800c705f91ea..2a9ae0ab682393cabda0e3604908e08d01d98b36 100644 (file)
@@ -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);