]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix partially uninitialized structure in xfs_reflink_remap_extent
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 12 Apr 2020 20:11:11 +0000 (13:11 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 13 Apr 2020 15:00:23 +0000 (08:00 -0700)
commitdaf8492cfafef547509542eeb438f4fe624faa2b
treea5b35f420a0ca5da6941567c8b975b39bf1b5a83
parent25b2f6c8355904339a4ab4f5e170486ee1308880
xfs: fix partially uninitialized structure in xfs_reflink_remap_extent

In the reflink extent remap function, it turns out that uirec (the block
mapping corresponding only to the part of the passed-in mapping that got
unmapped) was not fully initialized.  Specifically, br_state was not
being copied from the passed-in struct to the uirec.  This could lead to
unpredictable results such as the reflinked mapping being marked
unwritten in the destination file.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_reflink.c