mm: rotate_reclaimable_page() cleanup
Clean up messy conditional calling of test_clear_page_writeback() from both rotate_reclaimable_page() and end_page_writeback(). The only user of rotate_reclaimable_page() is end_page_writeback() so this is OK. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
f05111f501
commit
ac6aadb24b
10
mm/filemap.c
10
mm/filemap.c
@ -576,10 +576,12 @@ EXPORT_SYMBOL(unlock_page);
|
||||
*/
|
||||
void end_page_writeback(struct page *page)
|
||||
{
|
||||
if (!TestClearPageReclaim(page) || rotate_reclaimable_page(page)) {
|
||||
if (!test_clear_page_writeback(page))
|
||||
BUG();
|
||||
}
|
||||
if (TestClearPageReclaim(page))
|
||||
rotate_reclaimable_page(page);
|
||||
|
||||
if (!test_clear_page_writeback(page))
|
||||
BUG();
|
||||
|
||||
smp_mb__after_clear_bit();
|
||||
wake_up_page(page, PG_writeback);
|
||||
}
|
||||
|
Reference in New Issue
Block a user