f2fs: introduce help macro ADDRS_PER_PAGE()
Introduce help macro ADDRS_PER_PAGE() to get the number of address pointers in direct node or inode. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
@@ -652,8 +652,7 @@ static int get_data_block(struct inode *inode, sector_t iblock,
|
||||
goto put_out;
|
||||
}
|
||||
|
||||
end_offset = IS_INODE(dn.node_page) ?
|
||||
ADDRS_PER_INODE(F2FS_I(inode)) : ADDRS_PER_BLOCK;
|
||||
end_offset = ADDRS_PER_PAGE(dn.node_page, F2FS_I(inode));
|
||||
bh_result->b_size = (((size_t)1) << blkbits);
|
||||
dn.ofs_in_node++;
|
||||
pgofs++;
|
||||
@@ -675,8 +674,7 @@ get_next:
|
||||
if (dn.data_blkaddr == NEW_ADDR)
|
||||
goto put_out;
|
||||
|
||||
end_offset = IS_INODE(dn.node_page) ?
|
||||
ADDRS_PER_INODE(F2FS_I(inode)) : ADDRS_PER_BLOCK;
|
||||
end_offset = ADDRS_PER_PAGE(dn.node_page, F2FS_I(inode));
|
||||
}
|
||||
|
||||
if (maxblocks > (bh_result->b_size >> blkbits)) {
|
||||
|
Reference in New Issue
Block a user