|
|
@@ -263,14 +263,14 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi,
|
|
|
unsigned int secno, max_cost;
|
|
|
int nsearched = 0;
|
|
|
|
|
|
+ mutex_lock(&dirty_i->seglist_lock);
|
|
|
+
|
|
|
p.alloc_mode = alloc_mode;
|
|
|
select_policy(sbi, gc_type, type, &p);
|
|
|
|
|
|
p.min_segno = NULL_SEGNO;
|
|
|
p.min_cost = max_cost = get_max_cost(sbi, &p);
|
|
|
|
|
|
- mutex_lock(&dirty_i->seglist_lock);
|
|
|
-
|
|
|
if (p.alloc_mode == LFS && gc_type == FG_GC) {
|
|
|
p.min_segno = check_bg_victims(sbi);
|
|
|
if (p.min_segno != NULL_SEGNO)
|