xfs: don't reset the "inode core" in xfs_iread
authorChristoph Hellwig <hch@lst.de>
Tue, 12 Nov 2019 16:24:29 +0000 (08:24 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 13 Nov 2019 19:13:45 +0000 (11:13 -0800)
We have the exact same memset in xfs_inode_alloc, which is always called
just before xfs_iread.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_inode_buf.c

index 019c9be677cc84a69d242cf87252a5f9ca0184ac..8afacfe4be0a73bfca92801d8e43c93a0cd10407 100644 (file)
@@ -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;