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

udf: Fix off-by-one error when discarding preallocation

stable inclusion
from stable-v5.10.175
commit fe80a53eabdb256a0610c7681ca8823435c963ac
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8711T

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



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

[ Upstream commit f54aa97f ]

The condition determining whether the preallocation can be used had
an off-by-one error so we didn't discard preallocation when new
allocation was just following it. This can then confuse code in
inode_getblk().

CC: stable@vger.kernel.org
Fixes: 16d05565 ("udf: Discard preallocation before extending file with a hole")
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 30bcc6d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment