gfs2: use aligned-endian get/put helpers
PATCH 16/21 gfs2: use aligned-endian get/put helpers
Signed-off-by Harvey Harrison <[email protected]>
--- fs/gfs2/bmap.c | 2 +- fs/gfs2/lops.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
fs/gfs2/bmap.c +1 -1
@@ -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)); }
fs/gfs2/lops.c +2 -2
@@ -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 ) {
Signature · 1 line
1.5.5.1.570.g26b5e