@@ -32,7 +32,6 @@ void erofs_put_metabuf(struct erofs_buf *buf)
3232void * erofs_bread (struct erofs_buf * buf , erofs_off_t offset ,
3333 enum erofs_kmap_type type )
3434{
35- struct inode * inode = buf -> inode ;
3635 pgoff_t index = offset >> PAGE_SHIFT ;
3736 struct page * page = buf -> page ;
3837 struct folio * folio ;
@@ -42,7 +41,7 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset,
4241 erofs_put_metabuf (buf );
4342
4443 nofs_flag = memalloc_nofs_save ();
45- folio = read_cache_folio (inode -> i_mapping , index , NULL , NULL );
44+ folio = read_cache_folio (buf -> mapping , index , NULL , NULL );
4645 memalloc_nofs_restore (nofs_flag );
4746 if (IS_ERR (folio ))
4847 return folio ;
@@ -67,9 +66,9 @@ void *erofs_bread(struct erofs_buf *buf, erofs_off_t offset,
6766void erofs_init_metabuf (struct erofs_buf * buf , struct super_block * sb )
6867{
6968 if (erofs_is_fscache_mode (sb ))
70- buf -> inode = EROFS_SB (sb )-> s_fscache -> inode ;
69+ buf -> mapping = EROFS_SB (sb )-> s_fscache -> inode -> i_mapping ;
7170 else
72- buf -> inode = sb -> s_bdev -> bd_inode ;
71+ buf -> mapping = sb -> s_bdev -> bd_inode -> i_mapping ;
7372}
7473
7574void * erofs_read_metabuf (struct erofs_buf * buf , struct super_block * sb ,
0 commit comments