diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 35703a80137208b81cb38ab91ce50e28d80a19f2..aefa2134a8cbe01a032eaa77de159f6a21cf75b2 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -1049,7 +1049,7 @@ xfs_find_get_desired_pgoff( unsigned nr_pages; unsigned int i; - want = min_t(pgoff_t, end - index, PAGEVEC_SIZE); + want = min_t(pgoff_t, end - index, PAGEVEC_SIZE - 1) + 1; nr_pages = pagevec_lookup(&pvec, inode->i_mapping, index, want); /*