]> git.itanic.dy.fi Git - linux-stable/commit
xfs: return if_data from xfs_idata_realloc
authorChristoph Hellwig <hch@lst.de>
Wed, 20 Dec 2023 06:34:56 +0000 (07:34 +0100)
committerChandan Babu R <chandanbabu@kernel.org>
Fri, 29 Dec 2023 08:07:04 +0000 (13:37 +0530)
commit45c76a2add55b332d965c901e14004ae0134a67e
tree09d0e9c6657e4a764503aebbdfeb6b2454bf0cc0
parent6e145f943bd86be47e54101fa5939f9ed0cb73e5
xfs: return if_data from xfs_idata_realloc

Many of the xfs_idata_realloc callers need to set a local pointer to the
just reallocated if_data memory.  Return the pointer to simplify them a
bit and use the opportunity to re-use krealloc for freeing if_data if the
size hits 0.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/libxfs/xfs_attr_leaf.c
fs/xfs/libxfs/xfs_dir2_sf.c
fs/xfs/libxfs/xfs_inode_fork.c
fs/xfs/libxfs/xfs_inode_fork.h