Commit 7a1a7f5b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] mark_buffer_dirty() speedup

mark_buffer_dirty() is showing up on Anton's graphs.  Avoiding the
buslocked RMW if the buffer is already dirty should fix that up.
parent 85bfa7dc
...@@ -1218,7 +1218,7 @@ void mark_buffer_dirty(struct buffer_head *bh) ...@@ -1218,7 +1218,7 @@ void mark_buffer_dirty(struct buffer_head *bh)
{ {
if (!buffer_uptodate(bh)) if (!buffer_uptodate(bh))
buffer_error(); buffer_error();
if (!test_set_buffer_dirty(bh)) if (!buffer_dirty(bh) && !test_set_buffer_dirty(bh))
__set_page_dirty_nobuffers(bh->b_page); __set_page_dirty_nobuffers(bh->b_page);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment