Commit 57debb81 authored by Pali Rohár's avatar Pali Rohár Committed by Jan Kara

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.comSigned-off-by: default avatarPali Rohár <pali.rohar@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 49be68c4
...@@ -1063,7 +1063,8 @@ static int check_partition_desc(struct super_block *sb, ...@@ -1063,7 +1063,8 @@ static int check_partition_desc(struct super_block *sb,
goto force_ro; goto force_ro;
if (map->s_partition_type == UDF_VIRTUAL_MAP15 || if (map->s_partition_type == UDF_VIRTUAL_MAP15 ||
map->s_partition_type == UDF_VIRTUAL_MAP20) map->s_partition_type == UDF_VIRTUAL_MAP20 ||
map->s_partition_type == UDF_METADATA_MAP25)
goto force_ro; goto force_ro;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment