]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: set xefi_discard when creating a deferred agfl free log intent item
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 26 Oct 2020 22:19:38 +0000 (15:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:01 +0000 (19:22 +0100)
commit48510f80918cf23b1cf1362aaeeaa8477f0f99a7
tree07fd28c42e80c5fc66ce435eadd190c736c19f94
parent3b5c980a8e56de440270821ca1b5c633afa72b68
xfs: set xefi_discard when creating a deferred agfl free log intent item

[ Upstream commit 2c334e12f957cd8c6bb66b4aa3f79848b7c33cab ]

Make sure that we actually initialize xefi_discard when we're scheduling
a deferred free of an AGFL block.  This was (eventually) found by the
UBSAN while I was banging on realtime rmap problems, but it exists in
the upstream codebase.  While we're at it, rearrange the structure to
reduce the struct size from 64 to 56 bytes.

Fixes: fcb762f5de2e ("xfs: add bmapi nodiscard flag")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/libxfs/xfs_alloc.c
fs/xfs/libxfs/xfs_bmap.h