mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mm: write_cache_pages more terminate quickly
Now that we have the early-termination logic in place, it makes sense to bail out early in all other cases where done is set to 1. Signed-off-by: Nick Piggin <[email protected]> Cc: Chris Mason <[email protected]> Cc: Dave Chinner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d5482cdf8a
commit
82fd1a9a8c
1 changed files with 4 additions and 1 deletions
|
|
@ -983,12 +983,15 @@ continue_unlock:
|
|||
|
||||
if (wbc->sync_mode == WB_SYNC_NONE) {
|
||||
wbc->nr_to_write--;
|
||||
if (wbc->nr_to_write <= 0)
|
||||
if (wbc->nr_to_write <= 0) {
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (wbc->nonblocking && bdi_write_congested(bdi)) {
|
||||
wbc->encountered_congestion = 1;
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
pagevec_release(&pvec);
|
||||
|
|
|
|||
Loading…
Reference in a new issue