udf: Preserve link count of system files

commit fc8033a34a 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>
This commit is contained in:
Jan Kara 2023-01-03 09:56:56 +01:00 • committed by Greg Kroah-Hartman
commit 65f64fb9c2
3 changed files with 10 additions and 3 deletions