diff --git a/[refs] b/[refs] index e2058eb1a817..94a98f3fe597 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 71927e84e0aebfbe5a91565c3b207af25a4e9162 +refs/heads/master: aa373cf550994623efb5d49a4d8775bafd10bbc1 diff --git a/trunk/fs/fs-writeback.c b/trunk/fs/fs-writeback.c index 482de0a92ca7..9e72d04e706e 100644 --- a/trunk/fs/fs-writeback.c +++ b/trunk/fs/fs-writeback.c @@ -650,6 +650,16 @@ static long wb_writeback(struct bdi_writeback *wb, if (work->nr_pages <= 0) 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