diff options
author | Chao Yu <chao@kernel.org> | 2023-12-10 10:20:37 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-12-11 22:32:01 +0100 |
commit | 2020cd48e41cb8470bb1ca0835033d13d3178425 (patch) | |
tree | da21c5d38e21548d954cd7c4695ce24867b17f4d /fs/f2fs/data.c | |
parent | f2fs: delete obsolete FI_DROP_CACHE (diff) | |
download | linux-2020cd48e41cb8470bb1ca0835033d13d3178425.tar.xz linux-2020cd48e41cb8470bb1ca0835033d13d3178425.zip |
f2fs: introduce get_dnode_addr() to clean up codes
Just cleanup, no logic changes.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 7a81ff3c385a..ae46c4841ca9 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1181,16 +1181,9 @@ static int f2fs_submit_page_read(struct inode *inode, struct page *page, static void __set_data_blkaddr(struct dnode_of_data *dn) { - struct f2fs_node *rn = F2FS_NODE(dn->node_page); - __le32 *addr_array; - int base = 0; + __le32 *addr = get_dnode_addr(dn->inode, dn->node_page); - if (IS_INODE(dn->node_page) && f2fs_has_extra_attr(dn->inode)) - base = get_extra_isize(dn->inode); - - /* Get physical address of data block */ - addr_array = blkaddr_in_node(rn); - addr_array[base + dn->ofs_in_node] = cpu_to_le32(dn->data_blkaddr); + addr[dn->ofs_in_node] = cpu_to_le32(dn->data_blkaddr); } /* |