]> git.baikalelectronics.ru Git - kernel.git/commit
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:34:10 +0000 (09:34 +0100)
commitf5e031fb95ebe4c789aa7bed4d7026018ce2cb7a
treeb86986ed4858dd8f0926c4372e7cddc33d782532
parent6690f3be2667463f2a7ceab801e52538d8db9fff
udf: Do not update file length for failed writes to inline files

commit 01883c2f00fb0d45e1643e7d69ac48394aed73e6 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