]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: cleanup xfs_idestroy_fork
authorChristoph Hellwig <hch@lst.de>
Mon, 10 Aug 2020 20:32:06 +0000 (16:32 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 10 Aug 2020 20:32:06 +0000 (16:32 -0400)
commita87a40a26f1ec903b2adf0447363533590c6613c
tree7a00b58247b0698e6d3cc35d6b651b461f46af13
parentd967a68d0f6f0cd92f010e917fa590f4ed287522
xfs: cleanup xfs_idestroy_fork

Source kernel commit: ef8385128d4b31a382d496b1c433697993bd0bfb

Move freeing the dynamically allocated attr and COW fork, as well
as zeroing the pointers where actually needed into the callers, and
just pass the xfs_ifork structure to xfs_idestroy_fork.  Also simplify
the kmem_free calls by not checking for NULL first.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/rdwr.c
libxfs/xfs_attr_leaf.c
libxfs/xfs_inode_buf.c
libxfs/xfs_inode_fork.c
libxfs/xfs_inode_fork.h