mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
FROMGIT: 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> (cherry picked from commit605b0a778ahttps://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev) Change-Id: I892f215e778f7d89b9bbf3dfb292ed820944cf6b
This commit is contained in:
12
fs/f2fs/gc.c
12
fs/f2fs/gc.c
@@ -93,14 +93,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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user