f2fs: save a multiplication for last_nid calculation
A message that is not in the archive (sent off-list or not yet received): CGME20171102030338epcas1p19ad41be52b4346e4828fd9e0cc92d711@epcas1p1.samsung.com
PATCH 1/1 f2fs: save a multiplication for last_nid calculation
Use a slightly easier way to calculate last_nid.
Signed-off-by Fan li <[email protected]>
--- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/node.c +1 -1
@@ -2642,7 +2642,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++)
--
2.7.4
Quoted 3 lines · Fan Li
Use a slightly easier way to calculate
last_nid.Signed-off-by Fan li <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,
Quoted 18 lines
--- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/node.c +1
-2@@ -2642,7 +2642,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++) --
Quoted 2 lines
2.7.4
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot