diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-03-31 21:12:04 +0100 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-04-28 15:26:40 +0000 |
| commit | f5ef723c170f9889ff35ced2585fc9683182db71 (patch) | |
| tree | bd8db0e6d5cfe1bb8befae7d82aec8dd2dd77d78 /fs/f2fs/inline.c | |
| parent | 08e83ca0954caf163c0b99d627fb5a1b7a2c4508 (diff) | |
f2fs: Use a folio in f2fs_read_inline_dir()
Remove two calls to compound_head().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inline.c')
| -rw-r--r-- | fs/f2fs/inline.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 58f427e9d1f7..fda56c7e848e 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -755,7 +755,7 @@ int f2fs_read_inline_dir(struct file *file, struct dir_context *ctx, struct fscrypt_str *fstr) { struct inode *inode = file_inode(file); - struct page *ipage = NULL; + struct folio *ifolio = NULL; struct f2fs_dentry_ptr d; void *inline_dentry = NULL; int err; @@ -765,17 +765,17 @@ int f2fs_read_inline_dir(struct file *file, struct dir_context *ctx, if (ctx->pos == d.max) return 0; - ipage = f2fs_get_inode_page(F2FS_I_SB(inode), inode->i_ino); - if (IS_ERR(ipage)) - return PTR_ERR(ipage); + ifolio = f2fs_get_inode_folio(F2FS_I_SB(inode), inode->i_ino); + if (IS_ERR(ifolio)) + return PTR_ERR(ifolio); /* * f2fs_readdir was protected by inode.i_rwsem, it is safe to access * ipage without page's lock held. */ - unlock_page(ipage); + folio_unlock(ifolio); - inline_dentry = inline_data_addr(inode, ipage); + inline_dentry = inline_data_addr(inode, &ifolio->page); make_dentry_ptr_inline(inode, &d, inline_dentry); @@ -783,7 +783,7 @@ int f2fs_read_inline_dir(struct file *file, struct dir_context *ctx, if (!err) ctx->pos = d.max; - f2fs_put_page(ipage, 0); + f2fs_folio_put(ifolio, false); return err < 0 ? err : 0; } |