mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 18:25:48 -04:00
f2fs: Pass a folio to get_dnode_base()
The only caller already has a folio so pass it in. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
committed by
Jaegeuk Kim
parent
6d3a7f6589
commit
e8f46b2c3a
@@ -3039,20 +3039,20 @@ static inline __le32 *blkaddr_in_node(struct f2fs_node *node)
|
||||
|
||||
static inline int f2fs_has_extra_attr(struct inode *inode);
|
||||
static inline unsigned int get_dnode_base(struct inode *inode,
|
||||
struct page *node_page)
|
||||
struct folio *node_folio)
|
||||
{
|
||||
if (!IS_INODE(node_page))
|
||||
if (!IS_INODE(&node_folio->page))
|
||||
return 0;
|
||||
|
||||
return inode ? get_extra_isize(inode) :
|
||||
offset_in_addr(&F2FS_NODE(node_page)->i);
|
||||
offset_in_addr(&F2FS_NODE(&node_folio->page)->i);
|
||||
}
|
||||
|
||||
static inline __le32 *get_dnode_addr(struct inode *inode,
|
||||
struct folio *node_folio)
|
||||
{
|
||||
return blkaddr_in_node(F2FS_NODE(&node_folio->page)) +
|
||||
get_dnode_base(inode, &node_folio->page);
|
||||
get_dnode_base(inode, node_folio);
|
||||
}
|
||||
|
||||
static inline block_t data_blkaddr(struct inode *inode,
|
||||
|
||||
Reference in New Issue
Block a user