]> git.baikalelectronics.ru Git - kernel.git/commit
udf: Preserve link count of system files
authorJan Kara <jack@suse.cz>
Tue, 3 Jan 2023 08:56:56 +0000 (09:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:44:00 +0000 (16:44 +0100)
commitaf13c64170add4c7571d74d1282acb51d77671ab
treebcb148a69f9c705add1cf8fc50a094e3337784ec
parent71a8f0cb7ced94132de37ef977b53591e8121cf5
udf: Preserve link count of system files

commit fc8033a34a3ca7d23353e645e6dde5d364ac5f12 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: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/udf/inode.c
fs/udf/super.c
fs/udf/udf_i.h