On Sat, Jun 20, 2020 at 09:10:48AM +0200, Christoph Hellwig wrote: > The xfs_icdinode structure just contains a random mix of inode field, > which are all read from the on-disk inode and mostly not looked at > before reading the inode or initializing a new inode cluster. The > only exceptions are the forkoff and blocks field, which are used > in sanity checks for freshly allocated inodes. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> /me thinks this looks ok, though I'm leaning on Chandan probably having done a more thorough examination than I did... Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --D > --- > fs/xfs/xfs_icache.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c > index 0a5ac6f9a58349..660e7abd4e8b76 100644 > --- a/fs/xfs/xfs_icache.c > +++ b/fs/xfs/xfs_icache.c > @@ -66,7 +66,8 @@ xfs_inode_alloc( > memset(&ip->i_df, 0, sizeof(ip->i_df)); > ip->i_flags = 0; > ip->i_delayed_blks = 0; > - memset(&ip->i_d, 0, sizeof(ip->i_d)); > + ip->i_d.di_nblocks = 0; > + ip->i_d.di_forkoff = 0; > ip->i_sick = 0; > ip->i_checked = 0; > INIT_WORK(&ip->i_ioend_work, xfs_end_io); > -- > 2.26.2 >