lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 09 Sep 2010 14:00:58 -0500
From:	Eric Sandeen <>
To:	ext4 development <>
Subject: [PATCH] break out of ext4_num_dirty_pages() when we hit max_pages

ext4_num_dirty_pages() will continue scanning after we accumulate
max_pages, possibly for a very long time without doing anything
useful at all.  When we hit max_pages, we should set done=1
so that the break will release the pagevec, exit the loop, and
return from the function.

Signed-off-by: Eric Sandeen <>

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 4b8debe..d88ba4a 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1207,8 +1207,10 @@ static pgoff_t ext4_num_dirty_pages(struct inode *inode, pgoff_t idx,
-			if (num >= max_pages)
+			if (num >= max_pages) {
+				done = 1;
+			}

To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists