forked from Minki/linux
f2fs: fix wrong continue condition in GC
We should decrease the frozen counter.
Cc: stable@vger.kernel.org
Fixes: 325163e989
("f2fs: add gc_urgent_high_remaining sysfs node")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
80dc113aaa
commit
605b0a778a
12
fs/f2fs/gc.c
12
fs/f2fs/gc.c
@ -97,14 +97,10 @@ static int gc_thread_func(void *data)
|
||||
*/
|
||||
if (sbi->gc_mode == GC_URGENT_HIGH) {
|
||||
spin_lock(&sbi->gc_urgent_high_lock);
|
||||
if (sbi->gc_urgent_high_limited) {
|
||||
if (!sbi->gc_urgent_high_remaining) {
|
||||
sbi->gc_urgent_high_limited = false;
|
||||
spin_unlock(&sbi->gc_urgent_high_lock);
|
||||
sbi->gc_mode = GC_NORMAL;
|
||||
continue;
|
||||
}
|
||||
sbi->gc_urgent_high_remaining--;
|
||||
if (sbi->gc_urgent_high_limited &&
|
||||
!sbi->gc_urgent_high_remaining--) {
|
||||
sbi->gc_urgent_high_limited = false;
|
||||
sbi->gc_mode = GC_NORMAL;
|
||||
}
|
||||
spin_unlock(&sbi->gc_urgent_high_lock);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user