Skip to content

Commit

Permalink
f2fs: save a multiplication for last_nid calculation
Browse files Browse the repository at this point in the history
Use a slightly easier way to calculate last_nid.

Signed-off-by: Fan li <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Fan Li authored and Jaegeuk Kim committed Nov 6, 2017
1 parent 2b60311 commit f6986ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit f6986ed

Please sign in to comment.