diff options
Diffstat (limited to 'fs/gfs2/util.h')
-rw-r--r-- | fs/gfs2/util.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index 76a50899fe9e..28938a46cf47 100644 --- a/fs/gfs2/util.h +++ b/fs/gfs2/util.h | |||
@@ -83,8 +83,7 @@ static inline int gfs2_meta_check_i(struct gfs2_sbd *sdp, | |||
83 | char *file, unsigned int line) | 83 | char *file, unsigned int line) |
84 | { | 84 | { |
85 | struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; | 85 | struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; |
86 | u32 magic = mh->mh_magic; | 86 | u32 magic = be32_to_cpu(mh->mh_magic); |
87 | magic = be32_to_cpu(magic); | ||
88 | if (unlikely(magic != GFS2_MAGIC)) | 87 | if (unlikely(magic != GFS2_MAGIC)) |
89 | return gfs2_meta_check_ii(sdp, bh, "magic number", function, | 88 | return gfs2_meta_check_ii(sdp, bh, "magic number", function, |
90 | file, line); | 89 | file, line); |
@@ -107,9 +106,8 @@ static inline int gfs2_metatype_check_i(struct gfs2_sbd *sdp, | |||
107 | char *file, unsigned int line) | 106 | char *file, unsigned int line) |
108 | { | 107 | { |
109 | struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; | 108 | struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; |
110 | u32 magic = mh->mh_magic; | 109 | u32 magic = be32_to_cpu(mh->mh_magic); |
111 | u16 t = be32_to_cpu(mh->mh_type); | 110 | u16 t = be32_to_cpu(mh->mh_type); |
112 | magic = be32_to_cpu(magic); | ||
113 | if (unlikely(magic != GFS2_MAGIC)) | 111 | if (unlikely(magic != GFS2_MAGIC)) |
114 | return gfs2_meta_check_ii(sdp, bh, "magic number", function, | 112 | return gfs2_meta_check_ii(sdp, bh, "magic number", function, |
115 | file, line); | 113 | file, line); |
@@ -146,9 +144,9 @@ int gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh, | |||
146 | gfs2_io_error_bh_i((sdp), (bh), __FUNCTION__, __FILE__, __LINE__); | 144 | gfs2_io_error_bh_i((sdp), (bh), __FUNCTION__, __FILE__, __LINE__); |
147 | 145 | ||
148 | 146 | ||
149 | extern kmem_cache_t *gfs2_glock_cachep; | 147 | extern struct kmem_cache *gfs2_glock_cachep; |
150 | extern kmem_cache_t *gfs2_inode_cachep; | 148 | extern struct kmem_cache *gfs2_inode_cachep; |
151 | extern kmem_cache_t *gfs2_bufdata_cachep; | 149 | extern struct kmem_cache *gfs2_bufdata_cachep; |
152 | 150 | ||
153 | static inline unsigned int gfs2_tune_get_i(struct gfs2_tune *gt, | 151 | static inline unsigned int gfs2_tune_get_i(struct gfs2_tune *gt, |
154 | unsigned int *p) | 152 | unsigned int *p) |