diff options
author | Jan Kara <jack@suse.cz> | 2023-01-03 11:56:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 11:34:10 +0300 |
commit | 65f64fb9c2ab39e12e6200c44288e51378767cd7 (patch) | |
tree | 5ac0a33efb08fafac3e06c46801ade2c064ef531 /fs/udf/super.c | |
parent | 6837910aeb2c9101fc036dcd1b1f32615c20ec1a (diff) | |
download | linux-65f64fb9c2ab39e12e6200c44288e51378767cd7.tar.xz |
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>
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r-- | fs/udf/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c index 4042d9739fb7..6dc9d8dad88e 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -147,6 +147,7 @@ static struct inode *udf_alloc_inode(struct super_block *sb) ei->i_next_alloc_goal = 0; ei->i_strat4096 = 0; ei->i_streamdir = 0; + ei->i_hidden = 0; init_rwsem(&ei->i_data_sem); ei->cached_extent.lstart = -1; spin_lock_init(&ei->i_extent_cache_lock); |