Skip to content

Commit 57debb8

Browse files
palijankara
authored andcommitted
udf: Disallow R/W mode for disk with Metadata partition
Currently we do not support writing to UDF disks with Metadata partition. There is already check that disks with declared minimal write revision to UDF 2.50 or higher are mounted only in R/O mode but this does not cover situation when minimal write revision is set incorrectly (e.g. to 2.01). Link: https://lore.kernel.org/r/20200112144959.28104-1-pali.rohar@gmail.com Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
1 parent 49be68c commit 57debb8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎fs/udf/super.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,8 @@ static int check_partition_desc(struct super_block *sb,
10631063
goto force_ro;
10641064

10651065
if (map->s_partition_type == UDF_VIRTUAL_MAP15 ||
1066-
map->s_partition_type == UDF_VIRTUAL_MAP20)
1066+
map->s_partition_type == UDF_VIRTUAL_MAP20 ||
1067+
map->s_partition_type == UDF_METADATA_MAP25)
10671068
goto force_ro;
10681069

10691070
return 0;

0 commit comments

Comments
 (0)