linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] writeback: fix incorrect return value type of bdi_dirty_limit
@ 2012-08-18  9:49 Namjae Jeon
  2012-08-19  2:17 ` Fengguang Wu
  0 siblings, 1 reply; 6+ messages in thread
From: Namjae Jeon @ 2012-08-18  9:49 UTC (permalink / raw)
  To: fengguang.wu, akpm; +Cc: linux-kernel, Namjae Jeon

unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, unsigned long dirty)

Above function return type is unsigned long, but return value is
kept in "u64 bdi_dirty".
It can return incorrect value by type casting.

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
---
 mm/page-writeback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 49133b6..73a7a06 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -546,7 +546,7 @@ static unsigned long hard_dirty_limit(unsigned long thresh)
  */
 unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, unsigned long dirty)
 {
-	u64 bdi_dirty;
+	unsigned long bdi_dirty;
 	long numerator, denominator;
 
 	/*
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-20  0:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-18  9:49 [PATCH 2/3] writeback: fix incorrect return value type of bdi_dirty_limit Namjae Jeon
2012-08-19  2:17 ` Fengguang Wu
2012-08-19 10:23   ` Marco Stornelli
2012-08-19 10:35     ` Marco Stornelli
2012-08-19 23:49     ` Namjae Jeon
2012-08-20  0:09   ` Namjae Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).