]> git.baikalelectronics.ru Git - kernel.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)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 29 Oct 2020 15:19:18 +0000 (08:19 -0700)
commit12f2ee99385535fbcf210ca2b3f9208ff71fd5b4
tree4d26700de58f40821ab91c7f7a4d924639d89742
parenta1fe7c755400af92f0070a66f48f00b659aeacac
xfs: set xefi_discard when creating a deferred agfl free log intent item

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: 4186154e5e68 ("xfs: add bmapi nodiscard flag")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/libxfs/xfs_alloc.c
fs/xfs/libxfs/xfs_bmap.h