mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Kate Stewart <kstewart@linuxfoundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	Richard Fontana <rfontana@redhat.com>,
	ChenGang <cg.chen@huawei.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	ocfs2-devel@oss.oracle.com
Subject: Re: [Ocfs2-devel] [PATCH] OCFS2: remove useless err
Date: Wed, 5 Feb 2020 16:40:33 +0800	[thread overview]
Message-ID: <cab8dfcf-e254-694a-9993-c20388a9e9b6@linux.alibaba.com> (raw)
In-Reply-To: <2550e871-f930-92d1-4c75-fcd84fc20021@linux.alibaba.com>



On 20/2/4 19:34, Joseph Qi wrote:
> 
> 
> 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?
> 

Okay, in this case, bh is already NULL and will skip below,
so it looks fine to me.

  reply	other threads:[~2020-02-05  8:40 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
2020-02-05  8:40       ` Joseph Qi [this message]
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=cab8dfcf-e254-694a-9993-c20388a9e9b6@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=alex.shi@linux.alibaba.com \
    --cc=cg.chen@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

Powered by JetHome