f2fs: return the tmp_ptr directly in __bitmap_ptr
authorZhang Qilong <zhangqilong3@huawei.com>
Tue, 30 Aug 2022 12:13:23 +0000 (20:13 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Oct 2022 20:31:42 +0000 (13:31 -0700)
Just return tmp_ptr here, it's no need to dereference
checkpoint pointer again.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h

index 088c3d1574b8c92e9feed685657f0459fb1c6d47..0cc2f7aa45dbe8dffab0e5ac4bb4fe521698e56a 100644 (file)
@@ -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 {