All folios that f2fs sees belong to f2fs and not to the swapcache
so it can dereference folio->mapping directly like all other
filesystems do.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static int f2fs_read_data_folio(struct file *file, struct folio *folio)
{
- struct inode *inode = folio_file_mapping(folio)->host;
+ struct inode *inode = folio->mapping->host;
int ret = -EAGAIN;
trace_f2fs_readpage(folio, DATA);
void f2fs_do_read_inline_data(struct folio *folio, struct page *ipage)
{
- struct inode *inode = folio_file_mapping(folio)->host;
+ struct inode *inode = folio->mapping->host;
if (folio_test_uptodate(folio))
return;
),
TP_fast_assign(
- __entry->dev = folio_file_mapping(folio)->host->i_sb->s_dev;
- __entry->ino = folio_file_mapping(folio)->host->i_ino;
+ __entry->dev = folio->mapping->host->i_sb->s_dev;
+ __entry->ino = folio->mapping->host->i_ino;
__entry->type = type;
- __entry->dir =
- S_ISDIR(folio_file_mapping(folio)->host->i_mode);
- __entry->index = folio_index(folio);
+ __entry->dir = S_ISDIR(folio->mapping->host->i_mode);
+ __entry->index = folio->index;
__entry->dirty = folio_test_dirty(folio);
__entry->uptodate = folio_test_uptodate(folio);
),