Commit eef034ac authored by Alexander Potapenko's avatar Alexander Potapenko Committed by David Sterba
Browse files

affs: initialize fsdata in affs_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.

Fixes: f2b6a16e ("fs: affs convert to new aops")
Suggested-by: default avatarEric Biggers <ebiggers@kernel.org>
Signed-off-by: default avatarAlexander Potapenko <glider@google.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent b7bfaa76
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -880,7 +880,7 @@ affs_truncate(struct inode *inode)
	if (inode->i_size > AFFS_I(inode)->mmu_private) {
		struct address_space *mapping = inode->i_mapping;
		struct page *page;
		void *fsdata;
		void *fsdata = NULL;
		loff_t isize = inode->i_size;
		int res;