diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index f1517e9928c76bab8fbe6816bfb501f5d5eeb3b5..dc0e4cb7029b2e100b2ad139561dd5541a5e83b0 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -1043,7 +1043,7 @@ xfs_find_get_desired_pgoff( index = startoff >> PAGE_SHIFT; endoff = XFS_FSB_TO_B(mp, map->br_startoff + map->br_blockcount); - end = endoff >> PAGE_SHIFT; + end = (endoff - 1) >> PAGE_SHIFT; do { int want; unsigned nr_pages;