Commit 605b0a77 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: fix wrong continue condition in GC

We should decrease the frozen counter.

Cc: stable@vger.kernel.org
Fixes: 325163e9 ("f2fs: add gc_urgent_high_remaining sysfs node")
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 80dc113a
...@@ -97,14 +97,10 @@ static int gc_thread_func(void *data) ...@@ -97,14 +97,10 @@ static int gc_thread_func(void *data)
*/ */
if (sbi->gc_mode == GC_URGENT_HIGH) { if (sbi->gc_mode == GC_URGENT_HIGH) {
spin_lock(&sbi->gc_urgent_high_lock); spin_lock(&sbi->gc_urgent_high_lock);
if (sbi->gc_urgent_high_limited) { if (sbi->gc_urgent_high_limited &&
if (!sbi->gc_urgent_high_remaining) { !sbi->gc_urgent_high_remaining--) {
sbi->gc_urgent_high_limited = false; sbi->gc_urgent_high_limited = false;
spin_unlock(&sbi->gc_urgent_high_lock); sbi->gc_mode = GC_NORMAL;
sbi->gc_mode = GC_NORMAL;
continue;
}
sbi->gc_urgent_high_remaining--;
} }
spin_unlock(&sbi->gc_urgent_high_lock); spin_unlock(&sbi->gc_urgent_high_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment