From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Clemens Buchacher" <clemens.buchacher@intel.com>,
"Git Mailing List" <git@vger.kernel.org>,
"Eric Sunshine" <sunshine@sunshineco.com>,
"Martin Schröder" <martin.h.schroeder@intel.com>
Subject: Re: [PATCH] git_open_noatime: return with errno=0 on success
Date: Wed, 5 Aug 2015 10:59:09 +0200 [thread overview]
Message-ID: <CA+55aFx-WXxCbVTWdJHFf4WA2MNXS3UMerv4cD1wtsZGaQkJLw@mail.gmail.com> (raw)
In-Reply-To: <xmqqfv3y6a24.fsf@gitster.dls.corp.google.com>
On Tue, Aug 4, 2015 at 11:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
> I would agree it is a good idea to clear it after seeing the first
> open fail due to lack of O_NOATIME before trying open for the second
> time, iow, more like this?
So I don't think this is _wrong_ per se, but I think the deeper issue
is that somebody cares about 'errno' here in the first place.
A stale 'errno' generally shouldn't matter, because we either
(a) return success (and nobody should look at errno)
or
(b) return an error later, without setting errno for that _later_ error.
and I think either of those two situations are the real bug, and this
"clear stale errno" is just a workaround.
But as mentioned, I don't think clearign errno is wrong, so I'm not
objecting to the patch. I just suspect there's something else goign on
too..
Linus
next prev parent reply other threads:[~2015-08-05 9:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 12:38 [PATCH] git_open_noatime: return with errno=0 on success Clemens Buchacher
2015-07-08 18:51 ` Eric Sunshine
2015-08-04 8:24 ` Clemens Buchacher
2015-08-04 21:03 ` Junio C Hamano
2015-08-05 8:59 ` Linus Torvalds [this message]
2015-08-05 14:36 ` Clemens Buchacher
2015-08-05 16:27 ` Junio C Hamano
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=CA+55aFx-WXxCbVTWdJHFf4WA2MNXS3UMerv4cD1wtsZGaQkJLw@mail.gmail.com \
--to=torvalds@linux-foundation.org \
--cc=clemens.buchacher@intel.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=martin.h.schroeder@intel.com \
--cc=sunshine@sunshineco.com \
/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).