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

udf: Preserve link count of system files

stable inclusion
from stable-v5.10.173
commit 63478c3ce24bba1fb4736102bfb1aa986e215cb0
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=63478c3ce24bba1fb4736102bfb1aa986e215cb0



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

commit fc8033a3 upstream.

System files in UDF filesystem have link count 0. To not confuse VFS we
fudge the link count to be 1 when reading such inodes however we forget
to restore the link count of 0 when writing such inodes. Fix that.

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 be546ac6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment