]> 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>
Fri, 10 Mar 2023 08:34:10 +0000 (09:34 +0100)
commitc974ade8ac57d2cf5764fef84771a91a1877b932
tree5ac0a33efb08fafac3e06c46801ade2c064ef531
parentf5e031fb95ebe4c789aa7bed4d7026018ce2cb7a
udf: Preserve link count of system files

commit 38a046f5cbc4b7420e2d8db17b202ba1740c8944 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