f2fs: allow readpages with NULL file pointer
PATCH v2 1/1 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).
--- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/data.c +1 -1
@@ -1333,7 +1333,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);
Signature · 6 lines
2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Quoted 6 lines · On 2017/9/24 2:45, Hsiang Kao via Linux-f2fs-devel wrote:
Keep in line with the other Linux file system implementations since
page_cache_sync_readaheadsupports 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 <[email protected]>
Just encounter applying failure with this patch:
Applying: f2fs: allow readpages with NULL file pointer
error: corrupt patch at line 18
Patch failed at 0001 f2fs: allow readpages with NULL file pointer
Could you check and adjust the email client configuration to avoid its additional modification?
Thanks,
Quoted 9 lines
--- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/data.c +0
-0
fs/f2fs/data.c static int f2fs_read_data_pages(struct file *file, · line 1339
Quoted 8 lines
fs/f2fs/data.c +1
-1@@ -1333,7 +1333,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);
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot