affs: initialize fsdata in affs_truncate()
authorAlexander Potapenko <glider@google.com>
Tue, 10 Jan 2023 12:49:30 +0000 (13:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:27:06 +0000 (08:27 +0100)
commitb7a479c76481f85f8b39a59c9aff4737b761158c
treeaa33a4e59f7d8256fef958efb3ddb60268fe550f
parent623d1116898e68a5eb79f474634395ac0608b54a
affs: initialize fsdata in affs_truncate()

[ Upstream commit eef034ac6690118c88f357b00e2b3239c9d8575d ]

When aops->write_begin() does not initialize fsdata, KMSAN may report
an error passing the latter to aops->write_end().

Fix this by unconditionally initializing fsdata.

Fixes: f2b6a16eb8f5 ("fs: affs convert to new aops")
Suggested-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Alexander Potapenko <glider@google.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/affs/file.c