Re: [PATCH 2/2] xfs: remove the extra processing of zero size in xfs_idata_realloc()

2020-11-24 Thread Leizhen (ThunderTown)
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

Re: [PATCH 2/2] xfs: remove the extra processing of zero size in xfs_idata_realloc()

2020-11-24 Thread Christoph Hellwig
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

[PATCH 2/2] xfs: remove the extra processing of zero size in xfs_idata_realloc()

2020-11-24 Thread Zhen Lei
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. Signed-off-by: Zhen Lei --- fs/xfs/libxfs/xfs_inode_fork.c | 9 + 1