]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fully initialise temp leaf in xfs_attr3_leaf_unbalance
authorDave Chinner <dchinner@redhat.com>
Tue, 21 May 2013 08:02:05 +0000 (18:02 +1000)
committerBen Myers <bpm@sgi.com>
Thu, 23 May 2013 22:52:07 +0000 (17:52 -0500)
commit019ab32dbf38de3756146273e51d28893c32a966
tree7d21555f5c33cfc942443eed9e6459ddd7bbdfb3
parent8aa2faf440c0feee3c7d0a20813462f3ac0cfc75
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>
fs/xfs/xfs_attr_leaf.c