]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: zero inode fork buffer at allocation
authorDave Chinner <dchinner@redhat.com>
Wed, 4 May 2022 01:44:55 +0000 (11:44 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 4 May 2022 01:44:55 +0000 (11:44 +1000)
commita8f4cc32dd83428f1217b55407ce22637b1a9d10
tree1b639239a3010248ec1f1dd0ba1f8cec49a0bb8e
parent078b8ecfd83776ff183edebb8408186c285d040a
xfs: zero inode fork buffer at allocation

When we first allocate or resize an inline inode fork, we round up
the allocation to 4 byte alingment to make journal alignment
constraints. We don't clear the unused bytes, so we can copy up to
three uninitialised bytes into the journal. Zero those bytes so we
only ever copy zeros into the journal.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_inode_fork.c