xfs: simplify di_flags2 inheritance in xfs_ialloc
authorChristoph Hellwig <hch@lst.de>
Wed, 18 Mar 2020 15:15:10 +0000 (08:15 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 19 Mar 2020 15:48:47 +0000 (08:48 -0700)
commitb3d1d37544d8c98be610df0ed66c884ff18748d5
treeda3f3441e0382bdb3321726790134ba1d13e225f
parente9e2eae89ddb658ea332295153fdca78c12c1e0d
xfs: simplify di_flags2 inheritance in xfs_ialloc

di_flags2 is initialized to zero for v4 and earlier file systems.  This
means di_flags2 can only be non-zero for a v5 file systems, in which
case both the parent and child inodes can store the field.  Remove the
extra di_version check, and also remove the rather pointless local
di_flags2 variable while at it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_inode.c