aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chinner <[email protected]>2021-04-06 07:01:41 -0700
committerDarrick J. Wong <[email protected]>2021-04-07 14:37:06 -0700
commit8de1cb0038026a35dca276c69fa5caa5453879f3 (patch)
tree22abd654c7e10a33fbe7c3facd203b306c13f0e7
parent2442ee15bb1e726e0db1b90faf02211f88fb5d71 (diff)
xfs: inode fork allocation depends on XFS_IFEXTENT flag
Due to confusion on when the XFS_IFEXTENT needs to be set, the changes in e6a688c33238 ("xfs: initialise attr fork on inode create") failed to set the flag when initialising the empty attribute fork at inode creation. Set this flag the same way xfs_bmap_add_attrfork() does after attry fork allocation. Fixes: e6a688c33238 ("xfs: initialise attr fork on inode create") Signed-off-by: Dave Chinner <[email protected]> Tested-by: Brian Foster <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Allison Henderson <[email protected]>
-rw-r--r--fs/xfs/xfs_inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 7c5433e02553..e26dfcd4d241 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -875,6 +875,7 @@ xfs_init_new_inode(
if (init_xattrs && xfs_sb_version_hasattr(&mp->m_sb)) {
ip->i_forkoff = xfs_default_attroffset(ip) >> 3;
ip->i_afp = xfs_ifork_alloc(XFS_DINODE_FMT_EXTENTS, 0);
+ ip->i_afp->if_flags = XFS_IFEXTENTS;
}
/*