udf: Do not update file length for failed writes to inline files
authorJan Kara <jack@suse.cz>
Mon, 2 Jan 2023 19:14:47 +0000 (20:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:59 +0000 (09:39 +0100)
commitc5787d77a5c29fffd295d138bd118b334990a567
tree02d4b2e90a8c2ba41d5aadf775a26ef3bf131e37
parent9a8d602f0723586e668bae7e65c832ceb9bcc8bc
udf: Do not update file length for failed writes to inline files

commit 256fe4162f8b5a1625b8603ca5f7ff79725bfb47 upstream.

When write to inline file fails (or happens only partly), we still
updated length of inline data as if the whole write succeeded. Fix the
update of length of inline data to happen only if the write succeeds.

Reported-by: syzbot+0937935b993956ba28ab@syzkaller.appspotmail.com
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/udf/file.c