[PATCH 1/1] Add check for dirty_writeback_interval inbdi_wakeup_thread_delayed

From: Raghavendra D Prabhu
Date: Sun Apr 17 2011 - 12:23:23 EST


In the function bdi_wakeup_thread_delayed, no checks are performed on
dirty_writeback_interval unlike other places and timeout is being set to
zero as result, thus defeating the purpose. So, I have changed it to be
passed default value of interval which is 500 centiseconds, when it is
set to zero.
I have also verified this and tested it.

Signed-off-by: Raghavendra D Prabhu <rprabhu@xxxxxxxxxxx>
---
mm/backing-dev.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index befc875..d06533c 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -336,7 +336,10 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi)
{
unsigned long timeout;
- timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
+ if (dirty_writeback_interval)
+ timeout = msecs_to_jiffies(dirty_writeback_interval * 10);
+ else
+ timeout = msecs_to_jiffies(5000);
mod_timer(&bdi->wb.wakeup_timer, jiffies + timeout);
}
--
1.7.4.4

--------------------------
Raghavendra Prabhu
GPG Id : D72BE977

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/