writeback: stop background writeback when below background threshold
Treat bdi_start_writeback(0) as a special request to do background write,
and stop such work when we are below the background dirty threshold.
Also simplify the (nr_pages <= 0) checks. Since we already pass in
nr_pages=LONG_MAX for WB_SYNC_ALL and background writes, we don't
need to worry about it being decreased to zero.
Reported-by: Richard Kennedy <[email protected]>
CC: Jan Kara <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Signed-off-by: Wu Fengguang <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2 files changed