diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fs-writeback.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 3a07f6d8bc0..7cc67e39e7a 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -650,6 +650,16 @@ static long wb_writeback(struct bdi_writeback *wb, break; /* + * Background writeout and kupdate-style writeback may + * run forever. Stop them if there is other work to do + * so that e.g. sync can proceed. They'll be restarted + * after the other works are all done. + */ + if ((work->for_background || work->for_kupdate) && + !list_empty(&wb->bdi->work_list)) + break; + + /* * For background writeout, stop when we are below the * background dirty threshold */ |