From: Cong Wang <amwang@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
WANG Cong <xiyou.wangcong@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Eric B Munson <emunson@mgebm.net>,
David Rientjes <rientjes@google.com>,
Dave Hansen <dave@linux.vnet.ibm.com>, Mel Gorman <mel@csn.ul.ie>
Subject: Re: [Patch] proc: check error pointer returned by m_start()
Date: Mon, 28 Mar 2011 13:02:55 +0800 [thread overview]
Message-ID: <4D90167F.5080308@redhat.com> (raw)
In-Reply-To: <AANLkTi=mqKF=xeMYbj9LZgPfSLHSkO1JRXsNTW3LyHqu@mail.gmail.com>
于 2011年03月28日 11:58, Linus Torvalds 写道:
> On Sun, Mar 27, 2011 at 8:46 PM, Amerigo Wang<amwang@redhat.com> wrote:
>>
>> This is true, that commit changed the return value of m_start(),
>> which will return an error pointer on failure, but Al forgot
>> to check the error pointer in m_stop() which will be called
>> when m_start() fails. This patches fixes it.
>
> I did this slightly differently, and put the check in m_stop()
> instead, because I felt that matched the logic of m_start, while
> vma_stop() is more of an internal helper thing.
>
Ok, I am fine with this, will send an updated patch.
> I dunno. I don't think it matters. But one thing I reacted to was that
> when I was walking through the logic, I really wanted to say "seq_file
> is wrong to call m_stop if m_start returned an error code". I really
> felt like "hwy, if ->start fails, we damn well shouldn't have called
> ->stop".
This is a good point and makes prefect sense.
>
> But I guess we're stuck with that particular semantic for seq_files by now.
>
Yup, I guess there are some seq_file users still rely on this behavior,
we can fix them all later.
Thanks.
next prev parent reply other threads:[~2011-03-28 5:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-27 9:16 BUG: unable to handle kernel paging request Anca Emanuel
2011-03-27 15:37 ` Linus Torvalds
2011-03-27 16:00 ` Américo Wang
2011-03-27 17:44 ` Anca Emanuel
2011-03-27 17:52 ` Stephen Wilson
2011-03-28 3:46 ` [Patch] proc: check error pointer returned by m_start() Amerigo Wang
2011-03-28 3:58 ` Linus Torvalds
2011-03-28 5:02 ` Cong Wang [this message]
2011-03-28 5:26 ` [Patch V2] " Amerigo Wang
2011-03-28 5:45 ` Cong Wang
2011-03-28 7:07 ` [PATCH 1/2] proc: Use IS_ERR_OR_NULL() helper Amerigo Wang
2011-03-28 7:07 ` [PATCH 2/2] proc: do cleanup in m_start() rather than m_stop() Amerigo Wang
2011-03-28 7:15 ` [PATCH 1/2] proc: Use IS_ERR_OR_NULL() helper Mike Frysinger
2011-03-28 5:46 ` [Patch V2] proc: check error pointer returned by m_start() Anca Emanuel
2011-03-28 5:49 ` Cong Wang
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=4D90167F.5080308@redhat.com \
--to=amwang@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dave@linux.vnet.ibm.com \
--cc=emunson@mgebm.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=rientjes@google.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=xiyou.wangcong@gmail.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