xfs: split xfs_iformat_fork
authorChristoph Hellwig <hch@lst.de>
Thu, 14 May 2020 21:01:17 +0000 (14:01 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 19 May 2020 16:40:57 +0000 (09:40 -0700)
commit9229d18e801bdbdf79d963d8c944980fc77b5d6b
tree4ec0f911f9de00eecd2801f0731e777a91471fe9
parentcb7d58594412fff106cde550dd9e0a7999cc2a0c
xfs: split xfs_iformat_fork

xfs_iformat_fork is a weird catchall.  Split it into one helper for
the data fork and one for the attr fork, and then call both helper
as well as the COW fork initialization from xfs_inode_from_disk.  Order
the COW fork initialization after the attr fork initialization given
that it can't fail to simplify the error handling.

Note that the newly split helpers are moved down the file in
xfs_inode_fork.c to avoid the need for forward declarations.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_inode_buf.c
fs/xfs/libxfs/xfs_inode_fork.c
fs/xfs/libxfs/xfs_inode_fork.h