* [PATCH 16/21] gfs2: use aligned-endian get/put helpers
@ 2008-05-20 18:06 Harvey Harrison
0 siblings, 0 replies; only message in thread
From: Harvey Harrison @ 2008-05-20 18:06 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
fs/gfs2/bmap.c | 2 +-
fs/gfs2/lops.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index c19184f..42473ee 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -160,7 +160,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page)
gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
if (ip->i_di.di_size) {
- *(__be64 *)(di + 1) = cpu_to_be64(block);
+ put_be64(block, di + 1);;
gfs2_add_inode_blocks(&ip->i_inode, 1);
di->di_blocks = cpu_to_be64(gfs2_get_inode_blocks(&ip->i_inode));
}
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 4390f6f..3e7cac3 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -352,7 +352,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
offset = sizeof(struct gfs2_meta_header);
}
- *(__be64 *)(bh->b_data + offset) = cpu_to_be64(bd->bd_blkno);
+ put_be64(bd->bd_blkno, bh->b_data + offset);
kmem_cache_free(gfs2_bufdata_cachep, bd);
offset += sizeof(u64);
@@ -401,7 +401,7 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
gfs2_metatype_check(sdp, bh, GFS2_METATYPE_LB);
while (offset + sizeof(u64) <= sdp->sd_sb.sb_bsize) {
- blkno = be64_to_cpu(*(__be64 *)(bh->b_data + offset));
+ blkno = get_be64(bh->b_data + offset);
error = gfs2_revoke_add(sdp, blkno, start);
if (error < 0) {
--
1.5.5.1.570.g26b5e
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-20 18:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-20 18:06 [PATCH 16/21] gfs2: use aligned-endian get/put helpers Harvey Harrison
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®