]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: reinitialize rm_flags when unpacking an offset into an rmap irec
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 13 Dec 2019 00:54:33 +0000 (19:54 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 13 Dec 2019 00:54:33 +0000 (19:54 -0500)
commitd4eb45adbe42a4a8a5348d70941d1617527f96cb
tree3667a44137c80f6f4898174feb5a2732371d6db3
parent60a802ccc8fcc4b7480ab7ce8c4ce7b4a0caa205
xfs: reinitialize rm_flags when unpacking an offset into an rmap irec

Source kernel commit: ffb5696f7555e44c04b7c1212fcd83ddedc43498

In xfs_rmap_irec_offset_unpack, we should always clear the contents of
rm_flags before we begin unpacking the encoded (ondisk) offset into the
incore rm_offset and incore rm_flags fields.  Remove the open-coded
field zeroing as this encourages api misuse.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_rmap.c
libxfs/xfs_rmap.h