summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2016-02-24 10:20:44 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2016-02-26 02:27:03 +0100
commit80dd9c0e9db220697301e76b7b61f580ad9e8ecd (patch)
treee56ed4bab3b42033943ae3fdd86353e5f0db9936 /fs/f2fs/file.c
parentf2fs: avoid hungtask problem caused by losing wake_up (diff)
downloadlinux-80dd9c0e9db220697301e76b7b61f580ad9e8ecd.tar.xz
linux-80dd9c0e9db220697301e76b7b61f580ad9e8ecd.zip
f2fs: fix incorrect upper bound when iterating inode mapping tree
1. Inode mapping tree can index page in range of [0, ULONG_MAX], however, in some places, f2fs only search or iterate page in ragne of [0, LONG_MAX], result in miss hitting in page cache. 2. filemap_fdatawait_range accepts range parameters in unit of bytes, so the max range it covers should be [0, LLONG_MAX], if we use [0, LONG_MAX] as range for waiting on writeback, big number of pages will not be covered. This patch corrects above two issues. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 8dea19500120..0e2a2bde2635 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -301,7 +301,7 @@ static pgoff_t __get_first_dirty_index(struct address_space *mapping,
pagevec_init(&pvec, 0);
nr_pages = pagevec_lookup_tag(&pvec, mapping, &pgofs,
PAGECACHE_TAG_DIRTY, 1);
- pgofs = nr_pages ? pvec.pages[0]->index : LONG_MAX;
+ pgofs = nr_pages ? pvec.pages[0]->index : ULONG_MAX;
pagevec_release(&pvec);
return pgofs;
}