]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: fix krealloc to allow freeing data
authorDarrick J. Wong <djwong@kernel.org>
Fri, 12 Jan 2024 02:07:03 +0000 (18:07 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 12 Jan 2024 02:07:03 +0000 (18:07 -0800)
commit55021e7533bc55100f8ae0125aec513885cc5987
treeb9751ef4e5580d0c6f8615db82b55b0a7b388265
parentc2371fdd0ffeecb407969ad3e4e1d55f26e26407
libxfs: fix krealloc to allow freeing data

A recent refactoring to xfs_idata_realloc in the kernel made it depend
on krealloc returning NULL if the new size is zero.  The xfsprogs
wrapper instead aborts, so we need to make it follow the kernel
behavior.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/kmem.c