diff options
| author | Kinglong Mee <kinglongmee@gmail.com> | 2017-03-13 16:35:13 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-21 18:38:31 +0200 |
| commit | 507072353bbf7a698cfacd159e7db26d7c378792 (patch) | |
| tree | 46a6162c0806739275449fe11e5d05fc079c3c2d /fs/f2fs/data.c | |
| parent | 24c4b85b8e49d870cda2e47e2057e62cbe62321d (diff) | |
f2fs: fix bad prefetchw of NULL page
For f2fs_read_data_pages, the f2fs_mpage_readpages gets "page == NULL",
so that, the prefetchw(&page->flags) is operated on NULL.
Fixes: f1e8866016 ("f2fs: expose f2fs_mpage_readpages")
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
| -rw-r--r-- | fs/f2fs/data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 587a38ea0..99e9620ca 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1148,9 +1148,10 @@ static int f2fs_mpage_readpages(struct address_space *mapping, for (page_idx = 0; nr_pages; page_idx++, nr_pages--) { - prefetchw(&page->flags); if (pages) { page = list_last_entry(pages, struct page, lru); + + prefetchw(&page->flags); list_del(&page->lru); if (add_to_page_cache_lru(page, mapping, page->index, GFP_KERNEL)) |
