All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Darrick J . Wong" <darrick.wong@oracle.com>,
	Brian Foster <bfoster@redhat.com>,
	linux-xfs <linux-xfs@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] xfs: remove the extra processing of zero size in xfs_idata_realloc()
Date: Tue, 24 Nov 2020 20:05:51 +0800	[thread overview]
Message-ID: <e5f4527c-f110-f373-5e17-7decb5aea722@huawei.com> (raw)
In-Reply-To: <20201124115232.GC32060@infradead.org>



On 2020/11/24 19:52, Christoph Hellwig wrote:
> On Tue, Nov 24, 2020 at 06:45:31PM +0800, Zhen Lei wrote:
>> krealloc() does the free operation when the parameter new_size is 0, with
>> ZERO_SIZE_PTR returned. Because all other places use NULL to check whether
>> if_data is available or not, so covert it from ZERO_SIZE_PTR to NULL.
> 
> This new code looks much harder to read than the version it replaced.

OK

> 
> 


      reply	other threads:[~2020-11-24 12:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 10:45 [PATCH 0/2] xfs: check krealloc() return value and simplify code Zhen Lei
2020-11-24 10:45 ` [PATCH 1/2] xfs: check the return value of krealloc() Zhen Lei
2020-11-24 11:51   ` Christoph Hellwig
2020-11-24 12:05     ` Leizhen (ThunderTown)
2020-11-24 10:45 ` [PATCH 2/2] xfs: remove the extra processing of zero size in xfs_idata_realloc() Zhen Lei
2020-11-24 11:52   ` Christoph Hellwig
2020-11-24 12:05     ` Leizhen (ThunderTown) [this message]

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=e5f4527c-f110-f373-5e17-7decb5aea722@huawei.com \
    --to=thunder.leizhen@huawei.com \
    --cc=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.