public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] fs/buffer.c: exit if already confirmed page has dirty and writeback buffers
@ 2013-11-05 10:02 Gu Zheng
  2013-11-07 11:44 ` Jan Kara
  0 siblings, 1 reply; 3+ messages in thread
From: Gu Zheng @ 2013-11-05 10:02 UTC (permalink / raw)
  To: Al Viro; +Cc: fsdevel, linux-kernel

Stop the loop of iterating bh if we have confirmed page
has dirty and writeback buffers.

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
---
 fs/buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index 6024877..519cc5c 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -112,7 +112,7 @@ void buffer_check_dirty_writeback(struct page *page,
 			*dirty = true;
 
 		bh = bh->b_this_page;
-	} while (bh != head);
+	} while ((bh != head) && !(*writeback && *dirty));
 }
 EXPORT_SYMBOL(buffer_check_dirty_writeback);
 
-- 
1.7.7


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

end of thread, other threads:[~2013-11-08 10:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-05 10:02 [RESEND PATCH] fs/buffer.c: exit if already confirmed page has dirty and writeback buffers Gu Zheng
2013-11-07 11:44 ` Jan Kara
2013-11-08  9:56   ` Gu Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox