diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-02-14 17:44:10 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-03-19 11:41:25 -0700 |
commit | a2ced1ce1087a19361b7845c85a2d910fc591344 (patch) | |
tree | d0b4b85bcb7532a2f50ec331ce4f6a98706afcb6 /fs/f2fs/compress.c | |
parent | a7e679b53393c76d4427f4085ec9d114f06cac5a (diff) | |
download | lwn-a2ced1ce1087a19361b7845c85a2d910fc591344.tar.gz lwn-a2ced1ce1087a19361b7845c85a2d910fc591344.zip |
f2fs: clean up codes with {f2fs_,}data_blkaddr()
- rename datablock_addr() to data_blkaddr().
- wrap data_blkaddr() with f2fs_data_blkaddr() to clean up
parameters.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/compress.c')
-rw-r--r-- | fs/f2fs/compress.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 411d1a5679ac..5ef7d7cfc0e7 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -557,7 +557,7 @@ static int f2fs_compressed_blocks(struct compress_ctx *cc) for (i = 1; i < cc->cluster_size; i++) { block_t blkaddr; - blkaddr = datablock_addr(dn.inode, + blkaddr = data_blkaddr(dn.inode, dn.node_page, dn.ofs_in_node + i); if (blkaddr != NULL_ADDR) ret++; @@ -797,7 +797,7 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc, goto out_unlock_op; for (i = 0; i < cc->cluster_size; i++) { - if (datablock_addr(dn.inode, dn.node_page, + if (data_blkaddr(dn.inode, dn.node_page, dn.ofs_in_node + i) == NULL_ADDR) goto out_put_dnode; } @@ -846,8 +846,7 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc, for (i = 0; i < cc->cluster_size; i++, dn.ofs_in_node++) { block_t blkaddr; - blkaddr = datablock_addr(dn.inode, dn.node_page, - dn.ofs_in_node); + blkaddr = f2fs_data_blkaddr(&dn); fio.page = cc->rpages[i]; fio.old_blkaddr = blkaddr; |