aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hpfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-17 16:20:49 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-29 23:28:39 -0400
commit46287aa652fa8ea1edac41817ddc63332495ffc3 (patch)
tree9cb8043c555a66eae2fac22a3eeb7cdef78f3778 /fs/hpfs
parent6ce2bbba5266c1dd5c27dd8af1887ed8ca564919 (diff)
hpfs: annotate struct hpfs_dirent
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hpfs')
-rw-r--r--fs/hpfs/dnode.c8
-rw-r--r--fs/hpfs/hpfs.h14
-rw-r--r--fs/hpfs/hpfs_fn.h2
3 files changed, 12 insertions, 12 deletions
diff --git a/fs/hpfs/dnode.c b/fs/hpfs/dnode.c
index 6bf9fdeba6f2..3228c524ebe5 100644
--- a/fs/hpfs/dnode.c
+++ b/fs/hpfs/dnode.c
@@ -153,7 +153,7 @@ static void set_last_pointer(struct super_block *s, struct dnode *d, dnode_secno
153 } 153 }
154 de->length = cpu_to_le16(36); 154 de->length = cpu_to_le16(36);
155 de->down = 1; 155 de->down = 1;
156 *(dnode_secno *)((char *)de + 32) = cpu_to_le32(ptr); 156 *(__le32 *)((char *)de + 32) = cpu_to_le32(ptr);
157 } 157 }
158} 158}
159 159
@@ -177,7 +177,7 @@ struct hpfs_dirent *hpfs_add_de(struct super_block *s, struct dnode *d,
177 memmove((char *)de + d_size, de, (char *)de_end - (char *)de); 177 memmove((char *)de + d_size, de, (char *)de_end - (char *)de);
178 memset(de, 0, d_size); 178 memset(de, 0, d_size);
179 if (down_ptr) { 179 if (down_ptr) {
180 *(dnode_secno *)((char *)de + d_size - 4) = cpu_to_le32(down_ptr); 180 *(__le32 *)((char *)de + d_size - 4) = cpu_to_le32(down_ptr);
181 de->down = 1; 181 de->down = 1;
182 } 182 }
183 de->length = cpu_to_le16(d_size); 183 de->length = cpu_to_le16(d_size);
@@ -656,7 +656,7 @@ static void delete_empty_dnode(struct inode *i, dnode_secno dno)
656 del->down = 0; 656 del->down = 0;
657 d1->first_free = cpu_to_le32(le32_to_cpu(d1->first_free) - 4); 657 d1->first_free = cpu_to_le32(le32_to_cpu(d1->first_free) - 4);
658 } else if (down) 658 } else if (down)
659 *(dnode_secno *) ((void *) del + le16_to_cpu(del->length) - 4) = cpu_to_le32(down); 659 *(__le32 *) ((void *) del + le16_to_cpu(del->length) - 4) = cpu_to_le32(down);
660 } else goto endm; 660 } else goto endm;
661 if (!(de_cp = kmalloc(le16_to_cpu(de_prev->length), GFP_NOFS))) { 661 if (!(de_cp = kmalloc(le16_to_cpu(de_prev->length), GFP_NOFS))) {
662 printk("HPFS: out of memory for dtree balancing\n"); 662 printk("HPFS: out of memory for dtree balancing\n");
@@ -672,7 +672,7 @@ static void delete_empty_dnode(struct inode *i, dnode_secno dno)
672 de_prev->down = 1; 672 de_prev->down = 1;
673 dnode->first_free = cpu_to_le32(le32_to_cpu(dnode->first_free) + 4); 673 dnode->first_free = cpu_to_le32(le32_to_cpu(dnode->first_free) + 4);
674 } 674 }
675 *(dnode_secno *) ((void *) de_prev + le16_to_cpu(de_prev->length) - 4) = cpu_to_le32(ndown); 675 *(__le32 *) ((void *) de_prev + le16_to_cpu(de_prev->length) - 4) = cpu_to_le32(ndown);
676 hpfs_mark_4buffers_dirty(&qbh); 676 hpfs_mark_4buffers_dirty(&qbh);
677 hpfs_brelse4(&qbh); 677 hpfs_brelse4(&qbh);
678 for_all_poss(i, hpfs_pos_subst, ((loff_t)up << 4) | (p - 1), 4); 678 for_all_poss(i, hpfs_pos_subst, ((loff_t)up << 4) | (p - 1), 4);
diff --git a/fs/hpfs/hpfs.h b/fs/hpfs/hpfs.h
index f0dc10930332..051ff455b26d 100644
--- a/fs/hpfs/hpfs.h
+++ b/fs/hpfs/hpfs.h
@@ -300,7 +300,7 @@ struct dnode {
300}; 300};
301 301
302struct hpfs_dirent { 302struct hpfs_dirent {
303 u16 length; /* offset to next dirent */ 303 __le16 length; /* offset to next dirent */
304 304
305#ifdef __LITTLE_ENDIAN 305#ifdef __LITTLE_ENDIAN
306 u8 first: 1; /* set on phony ^A^A (".") entry */ 306 u8 first: 1; /* set on phony ^A^A (".") entry */
@@ -346,12 +346,12 @@ struct hpfs_dirent {
346 u8 read_only: 1; /* dos attrib */ 346 u8 read_only: 1; /* dos attrib */
347#endif 347#endif
348 348
349 fnode_secno fnode; /* fnode giving allocation info */ 349 __le32 fnode; /* fnode giving allocation info */
350 time32_t write_date; /* mtime */ 350 __le32 write_date; /* mtime */
351 u32 file_size; /* file length, bytes */ 351 __le32 file_size; /* file length, bytes */
352 time32_t read_date; /* atime */ 352 __le32 read_date; /* atime */
353 time32_t creation_date; /* ctime */ 353 __le32 creation_date; /* ctime */
354 u32 ea_size; /* total EA length, bytes */ 354 __le32 ea_size; /* total EA length, bytes */
355 u8 no_of_acls; /* number of ACL's (low 3 bits) */ 355 u8 no_of_acls; /* number of ACL's (low 3 bits) */
356 u8 ix; /* code page index (of filename), see 356 u8 ix; /* code page index (of filename), see
357 struct code_page_data */ 357 struct code_page_data */
diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h
index 88f096d9dbee..067269143543 100644
--- a/fs/hpfs/hpfs_fn.h
+++ b/fs/hpfs/hpfs_fn.h
@@ -100,7 +100,7 @@ struct quad_buffer_head {
100static inline dnode_secno de_down_pointer (struct hpfs_dirent *de) 100static inline dnode_secno de_down_pointer (struct hpfs_dirent *de)
101{ 101{
102 CHKCOND(de->down,("HPFS: de_down_pointer: !de->down\n")); 102 CHKCOND(de->down,("HPFS: de_down_pointer: !de->down\n"));
103 return le32_to_cpu(*(dnode_secno *) ((void *) de + le16_to_cpu(de->length) - 4)); 103 return le32_to_cpu(*(__le32 *) ((void *) de + le16_to_cpu(de->length) - 4));
104} 104}
105 105
106/* The first dir entry in a dnode */ 106/* The first dir entry in a dnode */