aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/filemap.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index a29318147365..f807afda86f2 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -885,6 +885,13 @@ repeat:
885 pages[ret] = page; 885 pages[ret] = page;
886 ret++; 886 ret++;
887 } 887 }
888
889 /*
890 * If all entries were removed before we could secure them,
891 * try again, because callers stop trying once 0 is returned.
892 */
893 if (unlikely(!ret && nr_found))
894 goto restart;
888 rcu_read_unlock(); 895 rcu_read_unlock();
889 return ret; 896 return ret;
890} 897}
@@ -1004,6 +1011,13 @@ repeat:
1004 pages[ret] = page; 1011 pages[ret] = page;
1005 ret++; 1012 ret++;
1006 } 1013 }
1014
1015 /*
1016 * If all entries were removed before we could secure them,
1017 * try again, because callers stop trying once 0 is returned.
1018 */
1019 if (unlikely(!ret && nr_found))
1020 goto restart;
1007 rcu_read_unlock(); 1021 rcu_read_unlock();
1008 1022
1009 if (ret) 1023 if (ret)