From: Chao Yu <yuchao0@huawei.com>
To: Colin King <colin.king@canonical.com>,
Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>
Cc: <kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix a redundant call to f2fs_balance_fs if an error occurs
Date: Fri, 5 Mar 2021 09:19:47 +0800 [thread overview]
Message-ID: <a67cbd86-0e44-490a-95fa-cf300e005d2e@huawei.com> (raw)
In-Reply-To: <20210304092118.2279879-1-colin.king@canonical.com>
On 2021/3/4 17:21, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The uninitialized variable dn.node_changed does not get set when a
> call to f2fs_get_node_page fails. This uninitialized value gets used
> in the call to f2fs_balance_fs() that may or not may not balances
> dirty node and dentry pages depending on the uninitialized state of
> the variable. Fix this by only calling f2fs_balance_fs if err is
> not set.
>
> Thanks to Jaegeuk Kim for suggesting an appropriate fix.
>
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: 2a3407607028 ("f2fs: call f2fs_balance_fs only when node was changed")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
prev parent reply other threads:[~2021-03-05 1:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 9:21 [PATCH] f2fs: fix a redundant call to f2fs_balance_fs if an error occurs Colin King
2021-03-05 1:19 ` Chao Yu [this message]
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=a67cbd86-0e44-490a-95fa-cf300e005d2e@huawei.com \
--to=yuchao0@huawei.com \
--cc=chao@kernel.org \
--cc=colin.king@canonical.com \
--cc=jaegeuk@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).