[-mm PATCH 24/32] drivers/md: fix-up schedule_timeout() usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Description: Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>

---

 drivers/md/raid5.c     |    3 +--
 drivers/md/raid6main.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff -urpN 2.6.13-rc5-mm1/drivers/md/raid5.c 2.6.13-rc5-mm1-dev/drivers/md/raid5.c
--- 2.6.13-rc5-mm1/drivers/md/raid5.c	2005-08-07 10:05:20.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/md/raid5.c	2005-08-08 15:06:49.000000000 -0700
@@ -1522,8 +1522,7 @@ static sector_t sync_request(mddev_t *md
 		/* 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);
 	}
 	spin_lock(&sh->lock);	
 	set_bit(STRIPE_SYNCING, &sh->state);
diff -urpN 2.6.13-rc5-mm1/drivers/md/raid6main.c 2.6.13-rc5-mm1-dev/drivers/md/raid6main.c
--- 2.6.13-rc5-mm1/drivers/md/raid6main.c	2005-08-07 10:05:20.000000000 -0700
+++ 2.6.13-rc5-mm1-dev/drivers/md/raid6main.c	2005-08-08 15:06:55.000000000 -0700
@@ -1681,8 +1681,7 @@ static sector_t sync_request(mddev_t *md
 		/* 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);
 	}
 	spin_lock(&sh->lock);
 	set_bit(STRIPE_SYNCING, &sh->state);
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux