summaryrefslogtreecommitdiffstats
path: root/fs/udf/udfdecl.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2018-02-22 10:28:52 +0100
committerJan Kara <jack@suse.cz>2018-02-27 10:25:33 +0100
commit0c9850f4d4c5d645125869fe0fa206fb662bd98b (patch)
tree441eb17e805ce00a37c008c4a63372ee087f4e53 /fs/udf/udfdecl.h
parentecd10aa42819cd5dcf639d25575e95a5bda8d08a (diff)
downloadtalos-obmc-linux-0c9850f4d4c5d645125869fe0fa206fb662bd98b.tar.gz
talos-obmc-linux-0c9850f4d4c5d645125869fe0fa206fb662bd98b.zip
udf: Clean up handling of invalid uid/gid
Current code relies on the fact that invalid uid/gid as defined by UDF 2.60 3.3.3.1 and 3.3.3.2 coincides with invalid uid/gid as used by the user namespaces implementation. Since this is only lucky coincidence, clean this up to avoid future surprises in case user namespaces implementation changes. Also this is more robust in presence of valid (from UDF point of view) uids / gids which do not map into current user namespace. Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/udfdecl.h')
-rw-r--r--fs/udf/udfdecl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h
index f5e0fe78979e..68e8a64d22e0 100644
--- a/fs/udf/udfdecl.h
+++ b/fs/udf/udfdecl.h
@@ -48,6 +48,8 @@ extern __printf(3, 4) void _udf_warn(struct super_block *sb,
#define UDF_EXTENT_LENGTH_MASK 0x3FFFFFFF
#define UDF_EXTENT_FLAG_MASK 0xC0000000
+#define UDF_INVALID_ID ((uint32_t)-1)
+
#define UDF_NAME_PAD 4
#define UDF_NAME_LEN 254
#define UDF_NAME_LEN_CS0 255
OpenPOWER on IntegriCloud