FROMGIT: f2fs: remove gc_urgent_high_limited for cleanup

Remove redundant sbi->gc_urgent_high_limited.

Signed-off-by: Chao Yu <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 265576181b
     https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Change-Id: Id92efe0343922c0b0fc279332ec102f1d8de8ecc
This commit is contained in:
Chao Yu
2022-08-20 11:06:00 +08:00
committed by Jaegeuk Kim
parent 68f703b19f
commit f18d40369c
3 changed files with 4 additions and 6 deletions

View File

@@ -1728,7 +1728,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 */

View File

@@ -93,10 +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_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);
} }

View File

@@ -513,7 +513,6 @@ out:
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);