mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f05111f501
commit
ac6aadb24b
3 changed files with 19 additions and 30 deletions
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue