summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKinglong Mee2017-03-13 09:35:13 +0100
committerJaegeuk Kim2017-03-22 03:34:31 +0100
commita83d50bc16c4f5d0a359790015b5b32f3f0e52db (patch)
tree47ea751a5e2adbe77678f677bd159dd7df53dd23 /fs
parentf2fs: clear FI_DATA_EXIST flag in truncate_inline_inode (diff)
downloadkernel-qcow2-linux-a83d50bc16c4f5d0a359790015b5b32f3f0e52db.tar.gz
kernel-qcow2-linux-a83d50bc16c4f5d0a359790015b5b32f3f0e52db.tar.xz
kernel-qcow2-linux-a83d50bc16c4f5d0a359790015b5b32f3f0e52db.zip
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')
-rw-r--r--fs/f2fs/data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index e341d446205a..2c8485bb6eb1 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1151,9 +1151,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,