diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-02-08 07:20:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:34 -0500 |
commit | 6c79e987d629cb0f8f7e2983725f4434a2dec66b (patch) | |
tree | ea2e17a12a0bdc5d68d2fe49941bfdf249e0f647 /fs/udf/misc.c | |
parent | 3a71fc5de56338076fe99f24f50bccfebabefe18 (diff) |
udf: remove some ugly macros
remove macros:
- UDF_SB_PARTMAPS
- UDF_SB_PARTTYPE
- UDF_SB_PARTROOT
- UDF_SB_PARTLEN
- UDF_SB_PARTVSN
- UDF_SB_PARTNUM
- UDF_SB_TYPESPAR
- UDF_SB_TYPEVIRT
- UDF_SB_PARTFUNC
- UDF_SB_PARTFLAGS
- UDF_SB_VOLIDENT
- UDF_SB_NUMPARTS
- UDF_SB_PARTITION
- UDF_SB_SESSION
- UDF_SB_ANCHOR
- UDF_SB_LASTBLOCK
- UDF_SB_LVIDBH
- UDF_SB_LVID
- UDF_SB_UMASK
- UDF_SB_GID
- UDF_SB_UID
- UDF_SB_RECORDTIME
- UDF_SB_SERIALNUM
- UDF_SB_UDFREV
- UDF_SB_FLAGS
- UDF_SB_VAT
- UDF_UPDATE_UDFREV
- UDF_SB_FREE
and open code them
convert UDF_SB_LVIDIU macro to udf_sb_lvidiu function
rename some struct udf_sb_info fields:
- s_volident to s_volume_ident
- s_lastblock to s_last_block
- s_lvidbh to s_lvid_bh
- s_recordtime to s_record_time
- s_serialnum to s_serial_number;
- s_vat to s_vat_inode;
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Ben Fennema <bfennema@falcon.csc.calpoly.edu>
Cc: Jan Kara <jack@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/misc.c')
-rw-r--r-- | fs/udf/misc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/udf/misc.c b/fs/udf/misc.c index 15297deb5051..7cecb3098061 100644 --- a/fs/udf/misc.c +++ b/fs/udf/misc.c | |||
@@ -81,14 +81,16 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size, | |||
81 | return NULL; | 81 | return NULL; |
82 | } | 82 | } |
83 | } else { | 83 | } else { |
84 | struct udf_sb_info *sbi = UDF_SB(inode->i_sb); | ||
85 | |||
84 | size -= sizeof(struct extendedAttrHeaderDesc); | 86 | size -= sizeof(struct extendedAttrHeaderDesc); |
85 | UDF_I_LENEATTR(inode) += sizeof(struct extendedAttrHeaderDesc); | 87 | UDF_I_LENEATTR(inode) += sizeof(struct extendedAttrHeaderDesc); |
86 | eahd->descTag.tagIdent = cpu_to_le16(TAG_IDENT_EAHD); | 88 | eahd->descTag.tagIdent = cpu_to_le16(TAG_IDENT_EAHD); |
87 | if (UDF_SB_UDFREV(inode->i_sb) >= 0x0200) | 89 | if (sbi->s_udfrev >= 0x0200) |
88 | eahd->descTag.descVersion = cpu_to_le16(3); | 90 | eahd->descTag.descVersion = cpu_to_le16(3); |
89 | else | 91 | else |
90 | eahd->descTag.descVersion = cpu_to_le16(2); | 92 | eahd->descTag.descVersion = cpu_to_le16(2); |
91 | eahd->descTag.tagSerialNum = cpu_to_le16(UDF_SB_SERIALNUM(inode->i_sb)); | 93 | eahd->descTag.tagSerialNum = cpu_to_le16(sbi->s_serial_number); |
92 | eahd->descTag.tagLocation = cpu_to_le32(UDF_I_LOCATION(inode).logicalBlockNum); | 94 | eahd->descTag.tagLocation = cpu_to_le32(UDF_I_LOCATION(inode).logicalBlockNum); |
93 | eahd->impAttrLocation = cpu_to_le32(0xFFFFFFFF); | 95 | eahd->impAttrLocation = cpu_to_le32(0xFFFFFFFF); |
94 | eahd->appAttrLocation = cpu_to_le32(0xFFFFFFFF); | 96 | eahd->appAttrLocation = cpu_to_le32(0xFFFFFFFF); |
@@ -192,15 +194,16 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block, | |||
192 | struct buffer_head *bh = NULL; | 194 | struct buffer_head *bh = NULL; |
193 | register uint8_t checksum; | 195 | register uint8_t checksum; |
194 | register int i; | 196 | register int i; |
197 | struct udf_sb_info *sbi = UDF_SB(sb); | ||
195 | 198 | ||
196 | /* Read the block */ | 199 | /* Read the block */ |
197 | if (block == 0xFFFFFFFF) | 200 | if (block == 0xFFFFFFFF) |
198 | return NULL; | 201 | return NULL; |
199 | 202 | ||
200 | bh = udf_tread(sb, block + UDF_SB_SESSION(sb)); | 203 | bh = udf_tread(sb, block + sbi->s_session); |
201 | if (!bh) { | 204 | if (!bh) { |
202 | udf_debug("block=%d, location=%d: read failed\n", | 205 | udf_debug("block=%d, location=%d: read failed\n", |
203 | block + UDF_SB_SESSION(sb), location); | 206 | block + sbi->s_session, location); |
204 | return NULL; | 207 | return NULL; |
205 | } | 208 | } |
206 | 209 | ||
@@ -210,7 +213,7 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block, | |||
210 | 213 | ||
211 | if (location != le32_to_cpu(tag_p->tagLocation)) { | 214 | if (location != le32_to_cpu(tag_p->tagLocation)) { |
212 | udf_debug("location mismatch block %u, tag %u != %u\n", | 215 | udf_debug("location mismatch block %u, tag %u != %u\n", |
213 | block + UDF_SB_SESSION(sb), le32_to_cpu(tag_p->tagLocation), location); | 216 | block + sbi->s_session, le32_to_cpu(tag_p->tagLocation), location); |
214 | goto error_out; | 217 | goto error_out; |
215 | } | 218 | } |
216 | 219 | ||
@@ -240,7 +243,7 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block, | |||
240 | return bh; | 243 | return bh; |
241 | } | 244 | } |
242 | udf_debug("Crc failure block %d: crc = %d, crclen = %d\n", | 245 | udf_debug("Crc failure block %d: crc = %d, crclen = %d\n", |
243 | block + UDF_SB_SESSION(sb), le16_to_cpu(tag_p->descCRC), | 246 | block + sbi->s_session, le16_to_cpu(tag_p->descCRC), |
244 | le16_to_cpu(tag_p->descCRCLength)); | 247 | le16_to_cpu(tag_p->descCRCLength)); |
245 | 248 | ||
246 | error_out: | 249 | error_out: |