From: Zhang Qilong Date: Tue, 30 Aug 2022 12:13:23 +0000 (+0800) Subject: f2fs: return the tmp_ptr directly in __bitmap_ptr X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=280dfeae56e6fbfff21cfece356379e318ae10fe;p=linux.git f2fs: return the tmp_ptr directly in __bitmap_ptr Just return tmp_ptr here, it's no need to dereference checkpoint pointer again. Signed-off-by: Zhang Qilong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 088c3d1574b8c..0cc2f7aa45dbe 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2529,7 +2529,7 @@ static inline void *__bitmap_ptr(struct f2fs_sb_info *sbi, int flag) if (__cp_payload(sbi) > 0) { if (flag == NAT_BITMAP) - return &ckpt->sit_nat_version_bitmap; + return tmp_ptr; else return (unsigned char *)ckpt + F2FS_BLKSIZE; } else {