]> 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)
commit1cb3f387222e14c96cb6e8576f35a6e602372efd
tree1b639239a3010248ec1f1dd0ba1f8cec49a0bb8e
parentb2e52e39a66e45c4225c270e94bd672f29af0f63
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