This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
gfs1-utils: master - gfs: don't swab in place
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Thu, 14 May 2009 08:28:07 +0000 (UTC)
- Subject: gfs1-utils: master - gfs: don't swab in place
Gitweb: http://git.fedorahosted.org/git/gfs1-utils.git?p=gfs1-utils.git;a=commitdiff;h=f190150c52fad148fa164775fe6317941a6a2f47
Commit: f190150c52fad148fa164775fe6317941a6a2f47
Parent: b20995d81eb22f7c8ace0e282318afae48f24508
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Thu May 14 10:21:45 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu May 14 10:27:57 2009 +0200
gfs: don't swab in place
because of the way gfs buffers work, it's not safe to swab in place.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
gfs/gfs_fsck/pass1c.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gfs/gfs_fsck/pass1c.c b/gfs/gfs_fsck/pass1c.c
index afe4a21..f1918cb 100644
--- a/gfs/gfs_fsck/pass1c.c
+++ b/gfs/gfs_fsck/pass1c.c
@@ -15,11 +15,14 @@ static int remove_eattr_entry(struct fsck_sb *sdp, osi_buf_t *leaf_bh,
if(!prev){
curr->ea_type = GFS_EATYPE_UNUSED;
} else {
- curr->ea_rec_len = gfs32_to_cpu(curr->ea_rec_len);
- prev->ea_rec_len = gfs32_to_cpu(prev->ea_rec_len);
+ uint32_t curr_rec_len;
+ uint32_t prev_rec_len;
+
+ curr_rec_len = gfs32_to_cpu(curr->ea_rec_len);
+ prev_rec_len = gfs32_to_cpu(prev->ea_rec_len);
prev->ea_rec_len =
- cpu_to_gfs32(curr->ea_rec_len + prev->ea_rec_len);
+ cpu_to_gfs32(curr_rec_len + prev_rec_len);
if (curr->ea_flags & GFS_EAFLAG_LAST)
prev->ea_flags |= GFS_EAFLAG_LAST;
}