summaryrefslogtreecommitdiff
path: root/fs/udf/udfdecl.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2018-02-22 12:28:52 +0300
committerJan Kara <jack@suse.cz>2018-02-27 12:25:33 +0300
commit0c9850f4d4c5d645125869fe0fa206fb662bd98b (patch)
tree441eb17e805ce00a37c008c4a63372ee087f4e53 /fs/udf/udfdecl.h
parentecd10aa42819cd5dcf639d25575e95a5bda8d08a (diff)
downloadlinux-0c9850f4d4c5d645125869fe0fa206fb662bd98b.tar.xz
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