diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-10-14 10:46:30 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-30 10:33:46 -0500 |
commit | b44b84d765b02f813a67b96bf79e3b5d4d621631 (patch) | |
tree | cc5353f1c7f4cacf8560d52c47f108333f179792 /fs/gfs2/inode.c | |
parent | b62f963e1fdf838fed91faec21228d421a834f2d (diff) |
[GFS2] gfs2 misc endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index dadd1f35c864..fb969302f181 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -500,21 +500,22 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, u64 *formal_ino) | |||
500 | if (!ir.ir_length) { | 500 | if (!ir.ir_length) { |
501 | struct buffer_head *m_bh; | 501 | struct buffer_head *m_bh; |
502 | u64 x, y; | 502 | u64 x, y; |
503 | __be64 z; | ||
503 | 504 | ||
504 | error = gfs2_meta_inode_buffer(m_ip, &m_bh); | 505 | error = gfs2_meta_inode_buffer(m_ip, &m_bh); |
505 | if (error) | 506 | if (error) |
506 | goto out_brelse; | 507 | goto out_brelse; |
507 | 508 | ||
508 | x = *(u64 *)(m_bh->b_data + sizeof(struct gfs2_dinode)); | 509 | z = *(__be64 *)(m_bh->b_data + sizeof(struct gfs2_dinode)); |
509 | x = y = be64_to_cpu(x); | 510 | x = y = be64_to_cpu(z); |
510 | ir.ir_start = x; | 511 | ir.ir_start = x; |
511 | ir.ir_length = GFS2_INUM_QUANTUM; | 512 | ir.ir_length = GFS2_INUM_QUANTUM; |
512 | x += GFS2_INUM_QUANTUM; | 513 | x += GFS2_INUM_QUANTUM; |
513 | if (x < y) | 514 | if (x < y) |
514 | gfs2_consist_inode(m_ip); | 515 | gfs2_consist_inode(m_ip); |
515 | x = cpu_to_be64(x); | 516 | z = cpu_to_be64(x); |
516 | gfs2_trans_add_bh(m_ip->i_gl, m_bh, 1); | 517 | gfs2_trans_add_bh(m_ip->i_gl, m_bh, 1); |
517 | *(u64 *)(m_bh->b_data + sizeof(struct gfs2_dinode)) = x; | 518 | *(__be64 *)(m_bh->b_data + sizeof(struct gfs2_dinode)) = z; |
518 | 519 | ||
519 | brelse(m_bh); | 520 | brelse(m_bh); |
520 | } | 521 | } |