Re: [PATCH 3/4] xfs: don't reset the "inode core" in xfs_iread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 20, 2019 at 10:21:44AM +0200, Christoph Hellwig wrote:
> We have the exact same memset in xfs_inode_alloc, which is always called
> just before xfs_iread.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Seems fine on its own, but then I looked at all the zero initializers
and memsets in xfs_inode_alloc and wondered why we don't just
kmem_zone_zalloc the inode?

Anyways,
Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

--D

> ---
>  fs/xfs/libxfs/xfs_inode_buf.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
> index 019c9be677cc..8afacfe4be0a 100644
> --- a/fs/xfs/libxfs/xfs_inode_buf.c
> +++ b/fs/xfs/libxfs/xfs_inode_buf.c
> @@ -631,8 +631,6 @@ xfs_iread(
>  	if ((iget_flags & XFS_IGET_CREATE) &&
>  	    xfs_sb_version_hascrc(&mp->m_sb) &&
>  	    !(mp->m_flags & XFS_MOUNT_IKEEP)) {
> -		/* initialise the on-disk inode core */
> -		memset(&ip->i_d, 0, sizeof(ip->i_d));
>  		VFS_I(ip)->i_generation = prandom_u32();
>  		ip->i_d.di_version = 3;
>  		return 0;
> -- 
> 2.20.1
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux