Skip to contentSkip to conversation

fs/buffer.c: exit if already confirmed page has dirty and writeback buffers

PATCH Superseded Gu Zheng 1 participant 1 message Nov 1, 2013 VFS

lore
Share & tools
lore

Gu Zheng

author
#0 lore raw

PATCH 1/1 fs/buffer.c: exit if already confirmed page has dirty and writeback buffers

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

---
 fs/buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/buffer.c +1 -1
index 6024877..519cc5c 100644
@@ -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);
 
Signature · 1 line
1.7.7