summaryrefslogtreecommitdiffstats
path: root/fs/udf/udf_sb.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2018-09-06 15:56:10 +0200
committerJan Kara <jack@suse.cz>2018-09-07 10:32:22 +0200
commita9ad01bc759df79b0012f43ee52164391e31cd96 (patch)
treef1c661d0ea79df14520453b5439a19e117892065 /fs/udf/udf_sb.h
parentext2: cache NULL when both default_acl and acl are NULL (diff)
downloadlinux-a9ad01bc759df79b0012f43ee52164391e31cd96.tar.xz
linux-a9ad01bc759df79b0012f43ee52164391e31cd96.zip
udf: Prevent write-unsupported filesystem to be remounted read-write
There are certain filesystem features which we support for reading but not for writing. We properly refuse to mount such filesystems read-write however for some features (such as read-only partitions), we don't check for these features when remounting the filesystem from read-only to read-write. Thus such filesystems could be remounted read-write leading to strange behavior (most likely crashes). Fix the problem by marking in superblock whether the filesystem has some features that are supported in read-only mode and check this flag during remount. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/udf_sb.h')
-rw-r--r--fs/udf/udf_sb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
index 9424d7cab790..d12e507e9eb2 100644
--- a/fs/udf/udf_sb.h
+++ b/fs/udf/udf_sb.h
@@ -30,6 +30,8 @@
#define UDF_FLAG_LASTBLOCK_SET 16
#define UDF_FLAG_BLOCKSIZE_SET 17
#define UDF_FLAG_INCONSISTENT 18
+#define UDF_FLAG_RW_INCOMPAT 19 /* Set when we find RW incompatible
+ * feature */
#define UDF_PART_FLAG_UNALLOC_BITMAP 0x0001
#define UDF_PART_FLAG_UNALLOC_TABLE 0x0002