]> Git Repo - linux.git/commitdiff
f2fs: pass the inode to f2fs_mpage_readpages
authorMatthew Wilcox (Oracle) <[email protected]>
Tue, 2 Jun 2020 04:47:27 +0000 (21:47 -0700)
committerLinus Torvalds <[email protected]>
Tue, 2 Jun 2020 17:59:07 +0000 (10:59 -0700)
This function now only uses the mapping argument to look up the inode, and
both callers already have the inode, so just pass the inode instead of the
mapping.

Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: William Kucharski <[email protected]>
Reviewed-by: Eric Biggers <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Acked-by: Jaegeuk Kim <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Cong Wang <[email protected]>
Cc: Darrick J. Wong <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Gao Xiang <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: Joseph Qi <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Zi Yan <[email protected]>
Cc: Johannes Thumshirn <[email protected]>
Cc: Miklos Szeredi <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
fs/f2fs/data.c

index 5b72945bf9f11eeef84d71c49876336035c3e26f..03ec97f28235a52874aa78afc553a917e2c7ab71 100644 (file)
@@ -2177,12 +2177,11 @@ out:
  * use ->readpage() or do the necessary surgery to decouple ->readpages()
  * from read-ahead.
  */
-static int f2fs_mpage_readpages(struct address_space *mapping,
+static int f2fs_mpage_readpages(struct inode *inode,
                struct readahead_control *rac, struct page *page)
 {
        struct bio *bio = NULL;
        sector_t last_block_in_bio = 0;
-       struct inode *inode = mapping->host;
        struct f2fs_map_blocks map;
 #ifdef CONFIG_F2FS_FS_COMPRESSION
        struct compress_ctx cc = {
@@ -2294,7 +2293,7 @@ static int f2fs_read_data_page(struct file *file, struct page *page)
        if (f2fs_has_inline_data(inode))
                ret = f2fs_read_inline_data(inode, page);
        if (ret == -EAGAIN)
-               ret = f2fs_mpage_readpages(page_file_mapping(page), NULL, page);
+               ret = f2fs_mpage_readpages(inode, NULL, page);
        return ret;
 }
 
@@ -2311,7 +2310,7 @@ static void f2fs_readahead(struct readahead_control *rac)
        if (f2fs_has_inline_data(inode))
                return;
 
-       f2fs_mpage_readpages(rac->mapping, rac, NULL);
+       f2fs_mpage_readpages(inode, rac, NULL);
 }
 
 int f2fs_encrypt_one_page(struct f2fs_io_info *fio)
This page took 0.060473 seconds and 4 git commands to generate.