]> 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)
commitadaef7112e2701abb091826699dcf1c1f057a76c
tree4d26700de58f40821ab91c7f7a4d924639d89742
parent68ed2672b8fdb9454c449f573990714135c93adc
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: 780ca8c6dd83 ("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