It's just a waste of time, because ub0 has no ub-specific dirty limits.
balance_dirty_pages handles ub0 case anyway.

Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
 mm/page-writeback.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 9940d5fe7dcb..ba5f93a84fca 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1403,9 +1403,11 @@ static void balance_dirty_pages_ub(struct address_space 
*mapping,
        unsigned long pages_written = 0;
        unsigned long pause = 1;
        struct user_beancounter *ub = get_io_ub();
-
        struct backing_dev_info *bdi = mapping->backing_dev_info;
 
+       if (ub == get_ub0())
+               return;
+
        for (;;) {
                unsigned long nr_to_write = write_chunk - pages_written;
 
-- 
2.1.4

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to