]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: fully initialise temp leaf in xfs_attr3_leaf_unbalance
authorDave Chinner <dchinner@redhat.com>
Fri, 7 Jun 2013 12:24:58 +0000 (22:24 +1000)
committerBen Myers <bpm@sgi.com>
Tue, 6 Aug 2013 21:32:24 +0000 (16:32 -0500)
commitfa74cedd9b9567cff37bfdcea8123a2e67a74a20
tree33cbd4709f4b18f71806c45388da5b61c2f5e87c
parent526f9be5acd2743fdef4cb95dbb8bab0d7dbca69
xfs: fully initialise temp leaf in xfs_attr3_leaf_unbalance

xfs_attr3_leaf_unbalance() uses a temporary buffer for recombining
the entries in two leaves when the destination leaf requires
compaction. The temporary buffer ends up being copied back over the
original destination buffer, so the header in the temporary buffer
needs to contain all the information that is in the destination
buffer.

To make sure the temporary buffer is fully initialised, once we've
set up the temporary incore header appropriately, write is back to
the temporary buffer before starting to move entries around.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
libxfs/xfs_attr_leaf.c