From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>
Cc: <stable@vger.kernel.org>
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix missing unlock(sbi->gc_mutex)
Date: Tue, 18 Dec 2018 18:33:36 +0800 [thread overview]
Message-ID: <8a552929-17cc-eb0b-f4e6-5a94a1735d83@huawei.com> (raw)
In-Reply-To: <20181218021530.78323-1-jaegeuk@kernel.org>
On 2018/12/18 10:15, Jaegeuk Kim wrote:
> This fixes missing unlock call.
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/super.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index b79677639108..2689a2cb56cc 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -1462,6 +1462,9 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)
>
> while (!f2fs_time_over(sbi, DISABLE_TIME)) {
> err = f2fs_gc(sbi, true, false, NULL_SEGNO);
> +
> + /* f2fs_gc guarantees unlock gc_mutex */
How about:
while () {
mutex_lock(&sbi->gc_mutex);
err = f2fs_gc();
if (err) {
handle error cases..
}
}
Thanks,
> + mutex_lock(&sbi->gc_mutex);
> if (err == -ENODATA)
> break;
> if (err && err != -EAGAIN) {
>
next prev parent reply other threads:[~2018-12-18 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 2:15 Jaegeuk Kim
2018-12-18 10:33 ` Chao Yu [this message]
2018-12-18 23:22 ` [PATCH v2] " Jaegeuk Kim
2018-12-19 3:44 ` [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=8a552929-17cc-eb0b-f4e6-5a94a1735d83@huawei.com \
--to=yuchao0@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.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
all inboxes | Powered by JetHome®