diff options
-rw-r--r-- | mm/filemap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index fa18e71f9c88..ec69fadf014c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1750,8 +1750,9 @@ pgoff_t page_cache_next_miss(struct address_space *mapping, pgoff_t index, unsigned long max_scan) { XA_STATE(xas, &mapping->i_pages, index); + unsigned long nr = max_scan; - while (max_scan--) { + while (nr--) { void *entry = xas_next(&xas); if (!entry || xa_is_value(entry)) return xas.xa_index; |