提交 8de1cb00 编写于 作者: D Dave Chinner 提交者: Darrick J. Wong

xfs: inode fork allocation depends on XFS_IFEXTENT flag

Due to confusion on when the XFS_IFEXTENT needs to be set, the
changes in e6a688c3 ("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: e6a688c3 ("xfs: initialise attr fork on inode create")
Signed-off-by: NDave Chinner <dchinner@redhat.com>
Tested-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
Reviewed-by: NAllison Henderson <allison.henderson@oracle.com>
上级 2442ee15
...@@ -875,6 +875,7 @@ xfs_init_new_inode( ...@@ -875,6 +875,7 @@ xfs_init_new_inode(
if (init_xattrs && xfs_sb_version_hasattr(&mp->m_sb)) { if (init_xattrs && xfs_sb_version_hasattr(&mp->m_sb)) {
ip->i_forkoff = xfs_default_attroffset(ip) >> 3; ip->i_forkoff = xfs_default_attroffset(ip) >> 3;
ip->i_afp = xfs_ifork_alloc(XFS_DINODE_FMT_EXTENTS, 0); ip->i_afp = xfs_ifork_alloc(XFS_DINODE_FMT_EXTENTS, 0);
ip->i_afp->if_flags = XFS_IFEXTENTS;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册