mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
Merge "f2fs: fix indefinite loop scanning for free nid"
This commit is contained in:
commit
e350f2d4e0
1 changed files with 3 additions and 0 deletions
|
|
@ -2371,6 +2371,9 @@ static int __f2fs_build_free_nids(struct f2fs_sb_info *sbi,
|
|||
if (unlikely(nid >= nm_i->max_nid))
|
||||
nid = 0;
|
||||
|
||||
if (unlikely(nid % NAT_ENTRY_PER_BLOCK))
|
||||
nid = NAT_BLOCK_OFFSET(nid) * NAT_ENTRY_PER_BLOCK;
|
||||
|
||||
/* Enough entries */
|
||||
if (nm_i->nid_cnt[FREE_NID] >= NAT_ENTRY_PER_BLOCK)
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue