From: Fan Li Date: Thu, 2 Nov 2017 03:02:52 +0000 (+0800) Subject: f2fs: save a multiplication for last_nid calculation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c33a70d7192db2aa037d957e353796ad38539c88;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git f2fs: save a multiplication for last_nid calculation Use a slightly easier way to calculate last_nid. Signed-off-by: Fan li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index a7f6603bfbea..fef5c68886b1 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2626,7 +2626,7 @@ static inline void load_free_nid_bitmap(struct f2fs_sb_info *sbi) __set_bit_le(i, nm_i->nat_block_bitmap); nid = i * NAT_ENTRY_PER_BLOCK; - last_nid = (i + 1) * NAT_ENTRY_PER_BLOCK; + last_nid = nid + NAT_ENTRY_PER_BLOCK; spin_lock(&NM_I(sbi)->nid_list_lock); for (; nid < last_nid; nid++)