Commit be546ac6 authored by Jan Kara's avatar Jan Kara Committed by sanglipeng
Browse files

udf: Do not update file length for failed writes to inline files

stable inclusion
from stable-v5.10.173
commit eb2133900cac2d2f78befd6be41666cf1a2315d9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=eb2133900cac2d2f78befd6be41666cf1a2315d9



--------------------------------

commit 256fe416 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: default avatar <syzbot+0937935b993956ba28ab@syzkaller.appspotmail.com>
CC: stable@vger.kernel.org
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 1e3161a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment