From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kate Stewart <kstewart@linuxfoundation.org>,
ChenGang <cg.chen@huawei.com>,
Richard Fontana <rfontana@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] OCFS2: remove useless err
Date: Tue, 4 Feb 2020 19:34:05 +0800 [thread overview]
Message-ID: <2550e871-f930-92d1-4c75-fcd84fc20021@linux.alibaba.com> (raw)
In-Reply-To: <f5c1b5cd-6fd2-f198-97e3-a4f34e990ba8@linux.alibaba.com>
On 20/2/4 18:59, Alex Shi wrote:
>
>
> 在 2020/1/26 上午9:52, Joseph Qi 写道:
>>
>
>>>
>>> @@ -708,7 +708,7 @@ static struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen,
>>> num++;
>>>
>>> bh = NULL;
>>> - err = ocfs2_read_dir_block(dir, b++, &bh,
>>> + ocfs2_read_dir_block(dir, b++, &bh,
>>> OCFS2_BH_READAHEAD);
>>
>> Umm... missing error checking here?
>
>
> /*
> * This function forces all errors to -EIO for consistency with its
> * predecessor, ocfs2_bread(). We haven't audited what returning the
> * real error codes would do to callers. We log the real codes with
> * mlog_errno() before we squash them.
> */
> static int ocfs2_read_dir_block(struct inode *inode, u64 v_block,
> struct buffer_head **bh, int flags)
>
> According to ocfs2_read_dir_block comments, caller don't care the err value, func will log it.
>
> So is this patch ok? :)
>
If we got error here, it means the buffer head is invalid.
So how about mark it as NULL and skip it?
Thanks,
Joseph
next prev parent reply other threads:[~2020-02-04 11:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 3:37 Alex Shi
2020-01-26 1:52 ` Joseph Qi
2020-02-04 10:59 ` Alex Shi
2020-02-04 11:34 ` Joseph Qi [this message]
2020-02-05 8:40 ` [Ocfs2-devel] " Joseph Qi
2020-02-05 8:41 ` Joseph Qi
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=2550e871-f930-92d1-4c75-fcd84fc20021@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=alex.shi@linux.alibaba.com \
--cc=cg.chen@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=jlbec@evilplan.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@oss.oracle.com \
--cc=rfontana@redhat.com \
--cc=tglx@linutronix.de \
/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®