fs: hfs: initialize fsdata in hfs_file_truncate()
authorAlexander Potapenko <glider@google.com>
Mon, 21 Nov 2022 11:21:33 +0000 (12:21 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:50:06 +0000 (22:50 -0800)
commite52a418d81fb3c9db187ca9aa519c534b30962a8
treed6ba11a43979c8b34a27d69b2ad6b6f713006f24
parente5576ac8c972a1884950420c3931ddebd018ee9e
fs: hfs: initialize fsdata in hfs_file_truncate()

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.

Link: https://lkml.kernel.org/r/20221121112134.407362-4-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Suggested-by: Eric Biggers <ebiggers@kernel.org>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Chao Yu <chao@kernel.org>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/hfs/extent.c