mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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>
This commit is contained in:
parent
14d8d5f7de
commit
71cb4afff8
1 changed files with 1 additions and 1 deletions
|
@ -1334,7 +1334,7 @@ static int f2fs_read_data_pages(struct file *file,
|
||||||
struct address_space *mapping,
|
struct address_space *mapping,
|
||||||
struct list_head *pages, unsigned nr_pages)
|
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);
|
struct page *page = list_last_entry(pages, struct page, lru);
|
||||||
|
|
||||||
trace_f2fs_readpages(inode, page, nr_pages);
|
trace_f2fs_readpages(inode, page, nr_pages);
|
||||||
|
|
Loading…
Reference in a new issue