From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/7] [GFS2] Fix uninitialised variable
Date: Thu, 12 Oct 2006 18:18:59 +0100 [thread overview]
Message-ID: <1160673539.11901.818.camel@quoit.chygwyn.com> (raw)
From f5c54804d9e3bb23d8924af09d9ca1c8de9560b6 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Tue, 10 Oct 2006 13:45:15 -0400
Subject: [GFS2] Fix uninitialised variable
This fixes a bug where, in certain cases an uninitialised variable
could cause a dereference of a NULL pointer in gfs2_commit_write().
Also a typo in a comment is fixed at the same time.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/ops_address.c | 1 +
fs/gfs2/rgrp.h | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index bdf56cf..99c9337 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -385,6 +385,7 @@ static int gfs2_prepare_write(struct fil
goto out_unlock;
+ ip->i_alloc.al_requested = 0;
if (alloc_required) {
al = gfs2_alloc_get(ip);
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h
index 9eedfd1..b01e0cf 100644
--- a/fs/gfs2/rgrp.h
+++ b/fs/gfs2/rgrp.h
@@ -32,7 +32,7 @@ void gfs2_rgrp_repolish_clones(struct gf
struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip);
static inline void gfs2_alloc_put(struct gfs2_inode *ip)
{
- return; /* Se we can see where ip->i_alloc is used */
+ return; /* So we can see where ip->i_alloc is used */
}
int gfs2_inplace_reserve_i(struct gfs2_inode *ip,
--
1.4.1
reply other threads:[~2006-10-12 17:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1160673539.11901.818.camel@quoit.chygwyn.com \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).