aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r--fs/udf/inode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 42783da9cfe3..487bdb7dc835 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1103,7 +1103,7 @@ static void __udf_read_inode(struct inode *inode)
1103 1103
1104 fe = (struct fileEntry *)bh->b_data; 1104 fe = (struct fileEntry *)bh->b_data;
1105 1105
1106 if (le16_to_cpu(fe->icbTag.strategyType) == 4096) { 1106 if (fe->icbTag.strategyType == cpu_to_le16(4096)) {
1107 struct buffer_head *ibh = NULL, *nbh = NULL; 1107 struct buffer_head *ibh = NULL, *nbh = NULL;
1108 struct indirectEntry *ie; 1108 struct indirectEntry *ie;
1109 1109
@@ -1140,7 +1140,7 @@ static void __udf_read_inode(struct inode *inode)
1140 } else { 1140 } else {
1141 brelse(ibh); 1141 brelse(ibh);
1142 } 1142 }
1143 } else if (le16_to_cpu(fe->icbTag.strategyType) != 4) { 1143 } else if (fe->icbTag.strategyType != cpu_to_le16(4)) {
1144 printk(KERN_ERR "udf: unsupported strategy type: %d\n", 1144 printk(KERN_ERR "udf: unsupported strategy type: %d\n",
1145 le16_to_cpu(fe->icbTag.strategyType)); 1145 le16_to_cpu(fe->icbTag.strategyType));
1146 brelse(bh); 1146 brelse(bh);
@@ -1164,9 +1164,9 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1164 fe = (struct fileEntry *)bh->b_data; 1164 fe = (struct fileEntry *)bh->b_data;
1165 efe = (struct extendedFileEntry *)bh->b_data; 1165 efe = (struct extendedFileEntry *)bh->b_data;
1166 1166
1167 if (le16_to_cpu(fe->icbTag.strategyType) == 4) 1167 if (fe->icbTag.strategyType == cpu_to_le16(4))
1168 UDF_I_STRAT4096(inode) = 0; 1168 UDF_I_STRAT4096(inode) = 0;
1169 else /* if (le16_to_cpu(fe->icbTag.strategyType) == 4096) */ 1169 else /* if (fe->icbTag.strategyType == cpu_to_le16(4096)) */
1170 UDF_I_STRAT4096(inode) = 1; 1170 UDF_I_STRAT4096(inode) = 1;
1171 1171
1172 UDF_I_ALLOCTYPE(inode) = le16_to_cpu(fe->icbTag.flags) & 1172 UDF_I_ALLOCTYPE(inode) = le16_to_cpu(fe->icbTag.flags) &
@@ -1177,7 +1177,7 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1177 UDF_I_LENALLOC(inode) = 0; 1177 UDF_I_LENALLOC(inode) = 0;
1178 UDF_I_NEXT_ALLOC_BLOCK(inode) = 0; 1178 UDF_I_NEXT_ALLOC_BLOCK(inode) = 0;
1179 UDF_I_NEXT_ALLOC_GOAL(inode) = 0; 1179 UDF_I_NEXT_ALLOC_GOAL(inode) = 0;
1180 if (le16_to_cpu(fe->descTag.tagIdent) == TAG_IDENT_EFE) { 1180 if (fe->descTag.tagIdent == cpu_to_le16(TAG_IDENT_EFE)) {
1181 UDF_I_EFE(inode) = 1; 1181 UDF_I_EFE(inode) = 1;
1182 UDF_I_USE(inode) = 0; 1182 UDF_I_USE(inode) = 0;
1183 if (udf_alloc_i_data(inode, inode->i_sb->s_blocksize - 1183 if (udf_alloc_i_data(inode, inode->i_sb->s_blocksize -
@@ -1189,7 +1189,7 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1189 bh->b_data + sizeof(struct extendedFileEntry), 1189 bh->b_data + sizeof(struct extendedFileEntry),
1190 inode->i_sb->s_blocksize - 1190 inode->i_sb->s_blocksize -
1191 sizeof(struct extendedFileEntry)); 1191 sizeof(struct extendedFileEntry));
1192 } else if (le16_to_cpu(fe->descTag.tagIdent) == TAG_IDENT_FE) { 1192 } else if (fe->descTag.tagIdent == cpu_to_le16(TAG_IDENT_FE)) {
1193 UDF_I_EFE(inode) = 0; 1193 UDF_I_EFE(inode) = 0;
1194 UDF_I_USE(inode) = 0; 1194 UDF_I_USE(inode) = 0;
1195 if (udf_alloc_i_data(inode, inode->i_sb->s_blocksize - 1195 if (udf_alloc_i_data(inode, inode->i_sb->s_blocksize -
@@ -1199,7 +1199,7 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1199 } 1199 }
1200 memcpy(UDF_I_DATA(inode), bh->b_data + sizeof(struct fileEntry), 1200 memcpy(UDF_I_DATA(inode), bh->b_data + sizeof(struct fileEntry),
1201 inode->i_sb->s_blocksize - sizeof(struct fileEntry)); 1201 inode->i_sb->s_blocksize - sizeof(struct fileEntry));
1202 } else if (le16_to_cpu(fe->descTag.tagIdent) == TAG_IDENT_USE) { 1202 } else if (fe->descTag.tagIdent == cpu_to_le16(TAG_IDENT_USE)) {
1203 UDF_I_EFE(inode) = 0; 1203 UDF_I_EFE(inode) = 0;
1204 UDF_I_USE(inode) = 1; 1204 UDF_I_USE(inode) = 1;
1205 UDF_I_LENALLOC(inode) = le32_to_cpu( 1205 UDF_I_LENALLOC(inode) = le32_to_cpu(
@@ -1458,7 +1458,7 @@ static int udf_update_inode(struct inode *inode, int do_sync)
1458 fe = (struct fileEntry *)bh->b_data; 1458 fe = (struct fileEntry *)bh->b_data;
1459 efe = (struct extendedFileEntry *)bh->b_data; 1459 efe = (struct extendedFileEntry *)bh->b_data;
1460 1460
1461 if (le16_to_cpu(fe->descTag.tagIdent) == TAG_IDENT_USE) { 1461 if (fe->descTag.tagIdent == cpu_to_le16(TAG_IDENT_USE)) {
1462 struct unallocSpaceEntry *use = 1462 struct unallocSpaceEntry *use =
1463 (struct unallocSpaceEntry *)bh->b_data; 1463 (struct unallocSpaceEntry *)bh->b_data;
1464 1464