Commit 26557618 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: remove gc_urgent_high_limited for cleanup

Remove redundant sbi->gc_urgent_high_limited.
Signed-off-by: default avatarChao Yu <chao.yu@oppo.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 34a23525
...@@ -1731,7 +1731,6 @@ struct f2fs_sb_info { ...@@ -1731,7 +1731,6 @@ struct f2fs_sb_info {
unsigned int gc_mode; /* current GC state */ unsigned int gc_mode; /* current GC state */
unsigned int next_victim_seg[2]; /* next segment in victim section */ unsigned int next_victim_seg[2]; /* next segment in victim section */
spinlock_t gc_urgent_high_lock; spinlock_t gc_urgent_high_lock;
bool gc_urgent_high_limited; /* indicates having limited trial count */
unsigned int gc_urgent_high_remaining; /* remaining trial count for GC_URGENT_HIGH */ unsigned int gc_urgent_high_remaining; /* remaining trial count for GC_URGENT_HIGH */
/* for skip statistic */ /* for skip statistic */
......
...@@ -97,10 +97,10 @@ static int gc_thread_func(void *data) ...@@ -97,10 +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_remaining) {
!sbi->gc_urgent_high_remaining--) { sbi->gc_urgent_high_remaining--;
sbi->gc_urgent_high_limited = false; if (!sbi->gc_urgent_high_remaining)
sbi->gc_mode = GC_NORMAL; sbi->gc_mode = GC_NORMAL;
} }
spin_unlock(&sbi->gc_urgent_high_lock); spin_unlock(&sbi->gc_urgent_high_lock);
} }
......
...@@ -527,7 +527,6 @@ static ssize_t __sbi_store(struct f2fs_attr *a, ...@@ -527,7 +527,6 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
if (!strcmp(a->attr.name, "gc_urgent_high_remaining")) { if (!strcmp(a->attr.name, "gc_urgent_high_remaining")) {
spin_lock(&sbi->gc_urgent_high_lock); spin_lock(&sbi->gc_urgent_high_lock);
sbi->gc_urgent_high_limited = t != 0;
sbi->gc_urgent_high_remaining = t; sbi->gc_urgent_high_remaining = t;
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