|
@@ -650,6 +650,16 @@ static long wb_writeback(struct bdi_writeback *wb,
|
|
if (work->nr_pages <= 0)
|
|
if (work->nr_pages <= 0)
|
|
break;
|
|
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
|
|
* For background writeout, stop when we are below the
|
|
* background dirty threshold
|
|
* background dirty threshold
|