From: Andrew Morton Date: Thu, 31 Aug 2006 10:56:06 +0000 (+0200) Subject: [PATCH] CONFIG_BLOCK: blk_congestion_wait() fix X-Git-Tag: v2.6.19-rc1~640^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcfd8d36151e531e1c6c731f1fbf792509a1c494;p=linux-2.6 [PATCH] CONFIG_BLOCK: blk_congestion_wait() fix Don't just do nothing: it'll cause busywaits all over writeback and page reclaim. For now, take a fixed-length nap. Will improve when NFS starts waking up throttled processes. Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe --- diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 3e36107d34..1d79b8d4ca 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1,6 +1,7 @@ #ifndef _LINUX_BLKDEV_H #define _LINUX_BLKDEV_H +#include #include #include #include @@ -848,7 +849,7 @@ void kblockd_flush(void); static inline long blk_congestion_wait(int rw, long timeout) { - return timeout; + return io_schedule_timeout(timeout); } static inline long nr_blockdev_pages(void) @@ -856,7 +857,9 @@ static inline long nr_blockdev_pages(void) return 0; } -static inline void exit_io_context(void) {} +static inline void exit_io_context(void) +{ +} #endif /* CONFIG_BLOCK */