Skip to content

Commit 71cb4af

Browse files
hsiangkaoJaegeuk Kim
authored andcommitted
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>
1 parent 14d8d5f commit 71cb4af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/f2fs/data.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,7 @@ static int f2fs_read_data_pages(struct file *file,
13341334
struct address_space *mapping,
13351335
struct list_head *pages, unsigned nr_pages)
13361336
{
1337-
struct inode *inode = file->f_mapping->host;
1337+
struct inode *inode = mapping->host;
13381338
struct page *page = list_last_entry(pages, struct page, lru);
13391339

13401340
trace_f2fs_readpages(inode, page, nr_pages);

0 commit comments

Comments
 (0)