Use the existing offsetof() macro instead of duplicating code.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
        src = F2FS_INODE(page);
        dst = F2FS_INODE(ipage);
 
-       memcpy(dst, src, (unsigned long)&src->i_ext - (unsigned long)src);
+       memcpy(dst, src, offsetof(struct f2fs_inode, i_ext));
        dst->i_size = 0;
        dst->i_blocks = cpu_to_le64(1);
        dst->i_links = cpu_to_le32(1);