From: Phil Sutter <phil@nwl.cc>
To: Andrea Claudi <aclaudi@redhat.com>
Cc: netdev@vger.kernel.org, stephen@networkplumber.org, dsahern@gmail.com
Subject: Re: [PATCH iproute2 1/2] lib/fs: avoid double call to mkdir on make_path()
Date: Fri, 18 Dec 2020 23:59:01 +0100 [thread overview]
Message-ID: <20201218225901.GX28824@orbyte.nwl.cc> (raw)
In-Reply-To: <625c55227b1f4e03320940cb087e466f019ca67e.1608315719.git.aclaudi@redhat.com>
Hi Andrea,
On Fri, Dec 18, 2020 at 08:09:22PM +0100, Andrea Claudi wrote:
> make_path() function calls mkdir two times in a row. The first one it
> stores mkdir return code, and then it calls it again to check for errno.
To me it rather seems like I rebased the original commit into a mess. Or
I got really confused by the covscan error message this is based upon.
Either way, I don't see why this would not be a bug. :)
> This seems unnecessary, as we can use the return code from the first
> call and check for errno if not 0.
>
Fixes: ac3415f5c1b1d ("lib/fs: Fix and simplify make_path()")
> Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Acked-by: Phil Sutter <phil@nwl.cc>
Thanks, Phil
next prev parent reply other threads:[~2020-12-18 23:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 19:09 [PATCH iproute2 0/2] Some fixes to lib/fs.c Andrea Claudi
2020-12-18 19:09 ` [PATCH iproute2 1/2] lib/fs: avoid double call to mkdir on make_path() Andrea Claudi
2020-12-18 22:59 ` Phil Sutter [this message]
2020-12-18 19:09 ` [PATCH iproute2 2/2] lib/fs: Fix single return points for get_cgroup2_* Andrea Claudi
2020-12-18 23:08 ` Phil Sutter
2020-12-18 23:29 ` Andrea Claudi
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=20201218225901.GX28824@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=aclaudi@redhat.com \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).