aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorHsiang Kao <hsiangkao@aol.com>2017-09-24 02:45:42 +0800
committerMister Oyster <oysterized@gmail.com>2017-12-06 16:40:32 +0100
commit3e8a09a99bc097c3868e98f09efe06b0f4a1bb0e (patch)
tree2a71b753684ff9acca914652e60cf7b3a619b082 /fs/f2fs
parent6b2896bf24ef69eb0bb051bea174db511b63e58e (diff)
f2fs: allow readpages with NULL file pointer
Keep in line with the other Linux file system implementations since page_cache_sync_readahead supports NULL file pointer, and thus we can readahead data by f2fs itself without file opening (something like the btrfs behavior). Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 2799fc3b9..424146e6d 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1329,7 +1329,7 @@ static int f2fs_read_data_pages(struct file *file,
struct address_space *mapping,
struct list_head *pages, unsigned nr_pages)
{
- struct inode *inode = file->f_mapping->host;
+ struct inode *inode = mapping->host;
struct page *page = list_last_entry(pages, struct page, lru);
trace_f2fs_readpages(inode, page, nr_pages);