From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/4] xfs: don't reset the "inode core" in xfs_iread
Date: Tue, 12 Nov 2019 08:24:21 -0800 [thread overview]
Message-ID: <20191112162421.GZ6219@magnolia> (raw)
In-Reply-To: <20191020082145.32515-4-hch@lst.de>
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@lst.de>
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@oracle.com>
--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
>
next prev parent reply other threads:[~2019-11-12 16:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-20 8:21 xfs inode structure cleanups Christoph Hellwig
2019-10-20 8:21 ` [PATCH 1/4] xfs: use a struct timespec64 for the in-core crtime Christoph Hellwig
2019-11-12 16:20 ` Darrick J. Wong
2019-10-20 8:21 ` [PATCH 2/4] xfs: merge the projid fields in struct xfs_icdinode Christoph Hellwig
2019-11-12 16:22 ` Darrick J. Wong
2019-10-20 8:21 ` [PATCH 3/4] xfs: don't reset the "inode core" in xfs_iread Christoph Hellwig
2019-11-12 16:24 ` Darrick J. Wong [this message]
2019-11-12 16:25 ` Christoph Hellwig
2019-10-20 8:21 ` [PATCH 4/4] xfs: remove struct xfs_icdinode Christoph Hellwig
2019-10-20 23:29 ` Dave Chinner
2019-10-23 1:28 ` Christoph Hellwig
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=20191112162421.GZ6219@magnolia \
--to=darrick.wong@oracle.com \
--cc=hch@lst.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox