aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/misc.c')
-rw-r--r--fs/udf/misc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/udf/misc.c b/fs/udf/misc.c
index 585e4eaed254..a3a513faddb0 100644
--- a/fs/udf/misc.c
+++ b/fs/udf/misc.c
@@ -74,8 +74,8 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size,
74 74
75 if (UDF_I_LENEATTR(inode)) { 75 if (UDF_I_LENEATTR(inode)) {
76 /* check checksum/crc */ 76 /* check checksum/crc */
77 if (le16_to_cpu(eahd->descTag.tagIdent) != 77 if (eahd->descTag.tagIdent !=
78 TAG_IDENT_EAHD || 78 cpu_to_le16(TAG_IDENT_EAHD) ||
79 le32_to_cpu(eahd->descTag.tagLocation) != 79 le32_to_cpu(eahd->descTag.tagLocation) !=
80 UDF_I_LOCATION(inode).logicalBlockNum) 80 UDF_I_LOCATION(inode).logicalBlockNum)
81 return NULL; 81 return NULL;
@@ -161,8 +161,8 @@ struct genericFormat *udf_get_extendedattr(struct inode *inode, uint32_t type,
161 eahd = (struct extendedAttrHeaderDesc *)ea; 161 eahd = (struct extendedAttrHeaderDesc *)ea;
162 162
163 /* check checksum/crc */ 163 /* check checksum/crc */
164 if (le16_to_cpu(eahd->descTag.tagIdent) != 164 if (eahd->descTag.tagIdent !=
165 TAG_IDENT_EAHD || 165 cpu_to_le16(TAG_IDENT_EAHD) ||
166 le32_to_cpu(eahd->descTag.tagLocation) != 166 le32_to_cpu(eahd->descTag.tagLocation) !=
167 UDF_I_LOCATION(inode).logicalBlockNum) 167 UDF_I_LOCATION(inode).logicalBlockNum)
168 return NULL; 168 return NULL;
@@ -233,8 +233,8 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
233 } 233 }
234 234
235 /* Verify the tag version */ 235 /* Verify the tag version */
236 if (le16_to_cpu(tag_p->descVersion) != 0x0002U && 236 if (tag_p->descVersion != cpu_to_le16(0x0002U) &&
237 le16_to_cpu(tag_p->descVersion) != 0x0003U) { 237 tag_p->descVersion != cpu_to_le16(0x0003U)) {
238 udf_debug("tag version 0x%04x != 0x0002 || 0x0003 block %d\n", 238 udf_debug("tag version 0x%04x != 0x0002 || 0x0003 block %d\n",
239 le16_to_cpu(tag_p->descVersion), block); 239 le16_to_cpu(tag_p->descVersion), block);
240 goto error_out; 240 goto error_out;