net/mlx5: Update error handler for UCTX and UMEM
[linux-2.6-microblaze.git] / mm / page-writeback.c
index 9c64490..2d498bb 100644 (file)
@@ -2366,8 +2366,15 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
                        ret = generic_writepages(mapping, wbc);
                if ((ret != -ENOMEM) || (wbc->sync_mode != WB_SYNC_ALL))
                        break;
-               cond_resched();
-               congestion_wait(BLK_RW_ASYNC, HZ/50);
+
+               /*
+                * Lacking an allocation context or the locality or writeback
+                * state of any of the inode's pages, throttle based on
+                * writeback activity on the local node. It's as good a
+                * guess as any.
+                */
+               reclaim_throttle(NODE_DATA(numa_node_id()),
+                       VMSCAN_THROTTLE_WRITEBACK);
        }
        /*
         * Usually few pages are written by now from those we've just submitted