]> 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, 15 Nov 2019 22:16:22 +0000 (17:16 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 15 Nov 2019 22:16:22 +0000 (17:16 -0500)
commit36c00a3073e1c64aa0cef472827429939e4ec998
tree3667a44137c80f6f4898174feb5a2732371d6db3
parentebc0f711cfb3410362d45fda67f5c167cfeed335
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