linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, stable@kernel.org
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix wrong continue condition in GC
Date: Fri, 19 Aug 2022 16:33:59 -0700	[thread overview]
Message-ID: <YwAd5wyhXIs1n108@google.com> (raw)
In-Reply-To: <65562b32-505f-796e-305a-d1b03baeb388@kernel.org>

On 08/15, Chao Yu wrote:
> On 2022/8/13 22:37, Jaegeuk Kim wrote:
> > We should decrease the frozen counter.
> > 
> > Cc: stable@kernel.org
> > Fixes: 325163e9892b ("f2fs: add gc_urgent_high_remaining sysfs node")
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> >   fs/f2fs/gc.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> > index 6da21d405ce1..7e4b41240d59 100644
> > --- a/fs/f2fs/gc.c
> > +++ b/fs/f2fs/gc.c
> > @@ -102,7 +102,7 @@ static int gc_thread_func(void *data)
> >   					sbi->gc_urgent_high_limited = false;
> >   					spin_unlock(&sbi->gc_urgent_high_lock);
> >   					sbi->gc_mode = GC_NORMAL;
> > -					continue;
> > +					goto next;
> >   				}
> >   				sbi->gc_urgent_high_remaining--;
> >   			}
> 
> Why not:
> 
> 	if (!sbi->gc_urgent_high_remaining) {
> 		sbi->gc_urgent_high_limited = false;
> 		spin_unlock(&sbi->gc_urgent_high_lock);

Should not call spin_unlock, if so. Anyway, let me send v2.

> 		sbi->gc_mode = GC_NORMAL;
> 	} else {
> 		sbi->gc_urgent_high_remaining--;
> 	}
> 
> Thanks,

  reply	other threads:[~2022-08-19 23:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-13 14:37 [PATCH] f2fs: fix wrong continue condition in GC Jaegeuk Kim
2022-08-15  3:52 ` [f2fs-dev] " Chao Yu
2022-08-19 23:33   ` Jaegeuk Kim [this message]
2022-08-19 23:34 ` [PATCH v2] " Jaegeuk Kim
2022-08-20  2:04   ` [f2fs-dev] " Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YwAd5wyhXIs1n108@google.com \
    --to=jaegeuk@kernel.org \
    --cc=chao@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).