aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/recovery.c
diff options
context:
space:
mode:
authorRussell Cattelan <cattelan@redhat.com>2006-08-10 11:08:40 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-08-10 17:18:59 -0400
commit8872187780f6104216c67e7b60c11f708b513c38 (patch)
tree690823763a87d7cd4c90e94760319414e2fc4ad6 /fs/gfs2/recovery.c
parent[DLM] reject replies to old requests (diff)
downloadlinux-dev-8872187780f6104216c67e7b60c11f708b513c38.tar.xz
linux-dev-8872187780f6104216c67e7b60c11f708b513c38.zip
[GFS2] Fix a couple of refcount leaks.
recovery.c add a brelse to deal with gfs2_replay_read_block being called twice on the same block. add a dput to drop the ref count on the root inode. This was causing lingering glocks and thus causing a mount failure to hang. Fix a endian conversion macro that was was swizzling 16bits when it should have been swizzling 32. Signed-off-by: Russell Cattelan <cattelan@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/recovery.c')
-rw-r--r--fs/gfs2/recovery.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index bbd44a4b1a1f..8fe518cfb3de 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -325,6 +325,7 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start,
error = get_log_header(jd, start, &lh);
if (!error) {
gfs2_replay_incr_blk(sdp, &start);
+ brelse(bh);
continue;
}
if (error == 1) {
@@ -396,7 +397,7 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
lh = (struct gfs2_log_header *)bh->b_data;
memset(lh, 0, sizeof(struct gfs2_log_header));
lh->lh_header.mh_magic = cpu_to_be32(GFS2_MAGIC);
- lh->lh_header.mh_type = cpu_to_be16(GFS2_METATYPE_LH);
+ lh->lh_header.mh_type = cpu_to_be32(GFS2_METATYPE_LH);
lh->lh_header.mh_format = cpu_to_be32(GFS2_FORMAT_LH);
lh->lh_sequence = cpu_to_be64(head->lh_sequence + 1);
lh->lh_flags = cpu_to_be32(GFS2_LOG_HEAD_UNMOUNT);