Commit 979f492f authored by LiFan's avatar LiFan Committed by Jaegeuk Kim

f2fs: remove a redundant conditional expression

Avoid checking is_inode repeatedly, and make the logic
a little bit clearer.
Signed-off-by: default avatarFan li <fanofcode.li@samsung.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent d5097be5
...@@ -1996,11 +1996,11 @@ static inline block_t datablock_addr(struct inode *inode, ...@@ -1996,11 +1996,11 @@ static inline block_t datablock_addr(struct inode *inode,
raw_node = F2FS_NODE(node_page); raw_node = F2FS_NODE(node_page);
/* from GC path only */ /* from GC path only */
if (!inode) { if (is_inode) {
if (is_inode) if (!inode)
base = offset_in_addr(&raw_node->i); base = offset_in_addr(&raw_node->i);
} else if (f2fs_has_extra_attr(inode) && is_inode) { else if (f2fs_has_extra_attr(inode))
base = get_extra_isize(inode); base = get_extra_isize(inode);
} }
addr_array = blkaddr_in_node(raw_node); addr_array = blkaddr_in_node(raw_node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment