linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: cmm@us.ibm.com, tytso@mit.edu, sandeen@redhat.com
Cc: linux-ext4@vger.kernel.org,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: [PATCH] ext4: Fix use of uninitialized data
Date: Thu, 15 May 2008 00:17:11 +0530	[thread overview]
Message-ID: <1210790832-20680-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> (raw)
In-Reply-To: <1210790832-20680-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

Fix use of uninitialized data with debug enabled.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 fs/ext4/mballoc.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 7871f46..4e79e48 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2748,8 +2748,6 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
 	sbi = EXT4_SB(sb);
 	es = sbi->s_es;
 
-	ext4_debug("using block group %lu(%d)\n", ac->ac_b_ex.fe_group,
-			gdp->bg_free_blocks_count);
 
 	err = -EIO;
 	bitmap_bh = read_block_bitmap(sb, ac->ac_b_ex.fe_group);
@@ -2765,6 +2763,9 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
 	if (!gdp)
 		goto out_err;
 
+	ext4_debug("using block group %lu(%d)\n", ac->ac_b_ex.fe_group,
+			gdp->bg_free_blocks_count);
+
 	err = ext4_journal_get_write_access(handle, gdp_bh);
 	if (err)
 		goto out_err;
@@ -3134,8 +3135,7 @@ static void ext4_mb_use_inode_pa(struct ext4_allocation_context *ac,
 static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac,
 				struct ext4_prealloc_space *pa)
 {
-	unsigned len = ac->ac_o_ex.fe_len;

  reply	other threads:[~2008-05-14 18:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14 18:47 [PATCH] ext4: printk stack trace on ext4_error, ext4_abort and ext4_warning Aneesh Kumar K.V
2008-05-14 18:47 ` Aneesh Kumar K.V [this message]
2008-05-14 18:47   ` [PATCH] ext4: Fix FLEX_BG and uninit group usage Aneesh Kumar K.V
2008-05-14 19:08     ` Jose R. Santos
2008-05-15  4:06       ` Aneesh Kumar K.V
2008-05-15 16:32         ` Jose R. Santos
2008-06-02  0:08   ` [PATCH] ext4: Fix use of uninitialized data Theodore Tso
2008-06-02  8:59     ` Aneesh Kumar K.V
2008-06-02 10:02     ` Shen Feng
2008-06-02 10:32       ` Aneesh Kumar K.V
2008-06-03  0:57         ` Shen Feng
2008-06-03 20:02           ` Andreas Dilger
2008-06-02 13:42     ` Eric Sandeen
2008-06-02 14:17       ` Aneesh Kumar K.V
2008-06-02 14:23         ` Eric Sandeen
2008-05-14 19:07 ` [PATCH] ext4: printk stack trace on ext4_error, ext4_abort and ext4_warning Eric Sandeen
2008-05-14 19:44   ` Theodore Tso
2008-05-15  4:25   ` Aneesh Kumar K.V

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=1210790832-20680-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /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).