udf: convert byte order of constant instead of variable
convert byte order of constant instead of variable, which can be done at compile time (vs run time) Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Jan Kara <jack@suse.cz> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
4daa1b8799
commit
5e0f001736
@ -1014,20 +1014,20 @@ static int udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
|
||||
le32_to_cpu(p->partitionLength); /* blocks */
|
||||
map->s_partition_root =
|
||||
le32_to_cpu(p->partitionStartingLocation);
|
||||
if (le32_to_cpu(p->accessType) ==
|
||||
PD_ACCESS_TYPE_READ_ONLY)
|
||||
if (p->accessType ==
|
||||
cpu_to_le32(PD_ACCESS_TYPE_READ_ONLY))
|
||||
map->s_partition_flags |=
|
||||
UDF_PART_FLAG_READ_ONLY;
|
||||
if (le32_to_cpu(p->accessType) ==
|
||||
PD_ACCESS_TYPE_WRITE_ONCE)
|
||||
if (p->accessType ==
|
||||
cpu_to_le32(PD_ACCESS_TYPE_WRITE_ONCE))
|
||||
map->s_partition_flags |=
|
||||
UDF_PART_FLAG_WRITE_ONCE;
|
||||
if (le32_to_cpu(p->accessType) ==
|
||||
PD_ACCESS_TYPE_REWRITABLE)
|
||||
if (p->accessType ==
|
||||
cpu_to_le32(PD_ACCESS_TYPE_REWRITABLE))
|
||||
map->s_partition_flags |=
|
||||
UDF_PART_FLAG_REWRITABLE;
|
||||
if (le32_to_cpu(p->accessType) ==
|
||||
PD_ACCESS_TYPE_OVERWRITABLE)
|
||||
if (p->accessType ==
|
||||
cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE))
|
||||
map->s_partition_flags |=
|
||||
UDF_PART_FLAG_OVERWRITABLE;
|
||||
|
||||
|
Reference in New Issue
Block a user