aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/objectid.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/objectid.c')
-rw-r--r--fs/reiserfs/objectid.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/reiserfs/objectid.c b/fs/reiserfs/objectid.c
index 0785c43a7486..bfe8e25ef293 100644
--- a/fs/reiserfs/objectid.c
+++ b/fs/reiserfs/objectid.c
@@ -11,13 +11,13 @@
11 11
12// find where objectid map starts 12// find where objectid map starts
13#define objectid_map(s,rs) (old_format_only (s) ? \ 13#define objectid_map(s,rs) (old_format_only (s) ? \
14 (__u32 *)((struct reiserfs_super_block_v1 *)(rs) + 1) :\ 14 (__le32 *)((struct reiserfs_super_block_v1 *)(rs) + 1) :\
15 (__u32 *)((rs) + 1)) 15 (__le32 *)((rs) + 1))
16 16
17 17
18#ifdef CONFIG_REISERFS_CHECK 18#ifdef CONFIG_REISERFS_CHECK
19 19
20static void check_objectid_map (struct super_block * s, __u32 * map) 20static void check_objectid_map (struct super_block * s, __le32 * map)
21{ 21{
22 if (le32_to_cpu (map[0]) != 1) 22 if (le32_to_cpu (map[0]) != 1)
23 reiserfs_panic (s, "vs-15010: check_objectid_map: map corrupted: %lx", 23 reiserfs_panic (s, "vs-15010: check_objectid_map: map corrupted: %lx",
@@ -27,7 +27,7 @@ static void check_objectid_map (struct super_block * s, __u32 * map)
27} 27}
28 28
29#else 29#else
30static void check_objectid_map (struct super_block * s, __u32 * map) 30static void check_objectid_map (struct super_block * s, __le32 * map)
31{;} 31{;}
32#endif 32#endif
33 33
@@ -52,7 +52,7 @@ __u32 reiserfs_get_unused_objectid (struct reiserfs_transaction_handle *th)
52{ 52{
53 struct super_block * s = th->t_super; 53 struct super_block * s = th->t_super;
54 struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s); 54 struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s);
55 __u32 * map = objectid_map (s, rs); 55 __le32 * map = objectid_map (s, rs);
56 __u32 unused_objectid; 56 __u32 unused_objectid;
57 57
58 BUG_ON (!th->t_trans_id); 58 BUG_ON (!th->t_trans_id);
@@ -97,7 +97,7 @@ void reiserfs_release_objectid (struct reiserfs_transaction_handle *th,
97{ 97{
98 struct super_block * s = th->t_super; 98 struct super_block * s = th->t_super;
99 struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s); 99 struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s);
100 __u32 * map = objectid_map (s, rs); 100 __le32 * map = objectid_map (s, rs);
101 int i = 0; 101 int i = 0;
102 102
103 BUG_ON (!th->t_trans_id); 103 BUG_ON (!th->t_trans_id);
@@ -172,12 +172,12 @@ int reiserfs_convert_objectid_map_v1(struct super_block *s) {
172 int new_size = (s->s_blocksize - SB_SIZE) / sizeof(__u32) / 2 * 2 ; 172 int new_size = (s->s_blocksize - SB_SIZE) / sizeof(__u32) / 2 * 2 ;
173 int old_max = sb_oid_maxsize(disk_sb); 173 int old_max = sb_oid_maxsize(disk_sb);
174 struct reiserfs_super_block_v1 *disk_sb_v1 ; 174 struct reiserfs_super_block_v1 *disk_sb_v1 ;
175 __u32 *objectid_map, *new_objectid_map ; 175 __le32 *objectid_map, *new_objectid_map ;
176 int i ; 176 int i ;
177 177
178 disk_sb_v1=(struct reiserfs_super_block_v1 *)(SB_BUFFER_WITH_SB(s)->b_data); 178 disk_sb_v1=(struct reiserfs_super_block_v1 *)(SB_BUFFER_WITH_SB(s)->b_data);
179 objectid_map = (__u32 *)(disk_sb_v1 + 1) ; 179 objectid_map = (__le32 *)(disk_sb_v1 + 1) ;
180 new_objectid_map = (__u32 *)(disk_sb + 1) ; 180 new_objectid_map = (__le32 *)(disk_sb + 1) ;
181 181
182 if (cur_size > new_size) { 182 if (cur_size > new_size) {
183 /* mark everyone used that was listed as free at the end of the objectid 183 /* mark everyone used that was listed as free at the end of the objectid