[PATCH] drivers/md: fix-up schedule_timeout() usage
authorNishanth Aravamudan <nacc@us.ibm.com>
Mon, 7 Nov 2005 09:01:17 +0000 (01:01 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 7 Nov 2005 15:53:57 +0000 (07:53 -0800)
Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid5.c
drivers/md/raid6main.c

index 6497295ebfb93150d1cf4087bfca7b60c3e2bf63..1223e98ecd70f538419790c48bfe19f664561480 100644 (file)
@@ -1587,8 +1587,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
                /* make sure we don't swamp the stripe cache if someone else
                 * is trying to get access 
                 */
-               set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(1);
+               schedule_timeout_uninterruptible(1);
        }
        bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 0);
        spin_lock(&sh->lock);   
index 6437a95ffc1cd573da840c4a0c29674973a14efb..7757869477019ea5a87a186b6b46ced5fcb1fcd7 100644 (file)
@@ -1746,8 +1746,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
                /* make sure we don't swamp the stripe cache if someone else
                 * is trying to get access
                 */
-               set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(1);
+               schedule_timeout_uninterruptible(1);
        }
        bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 0);
        spin_lock(&sh->lock);