All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Linux Torvalds <torvalds@linux-foundation.org>
Cc: ReiserFS Development Mailing List <reiserfs-devel@vger.kernel.org>
Subject: [patch 5/7] reiserfs: fix memset byte count during resize
Date: Tue, 16 Oct 2007 19:02:15 -0400	[thread overview]
Message-ID: <20071016230258.847418000@suse.com> (raw)
In-Reply-To: 20071016230210.779927000@suse.com

[-- Attachment #1: patches.suse/reiserfs-fix-resize-meminit.diff --]
[-- Type: text/plain, Size: 876 bytes --]

 The following patch corrects the memset in reiserfs_resize to clear
 the memory allocated for the new bitmap info structs. Previously,
 it would clear the memory used by the old size. Depending on the
 contents of memory, this could cause incorrect caching behavior for
 bitmap blocks in the newly allocated area.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 fs/reiserfs/resize.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/reiserfs/resize.c	2007-10-16 18:52:23.281225507 -0400
+++ b/fs/reiserfs/resize.c	2007-10-16 18:55:56.641755755 -0400
@@ -119,7 +119,7 @@ int reiserfs_resize(struct super_block *
 			return -ENOMEM;
 		}
 		memset(bitmap, 0,
-		       sizeof(struct reiserfs_bitmap_info) * SB_BMAP_NR(s));
+		       sizeof(struct reiserfs_bitmap_info) * bmap_nr_new);
 		for (i = 0; i < bmap_nr; i++)
 			bitmap[i] = old_bitmap[i];
 

-- 


  parent reply	other threads:[~2007-10-16 23:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-16 23:02 [patch 0/7] reiserfs fixes patch set Jeff Mahoney
2007-10-16 23:02 ` [patch 1/7] reiserfs: fix up lockdep warnings Jeff Mahoney
2007-10-16 23:02 ` [patch 2/7] reiserfs: dont use BUG when panicking Jeff Mahoney
2007-10-16 23:02 ` [patch 3/7] reiserfs: use is_reusable to catch corruption Jeff Mahoney
2007-10-16 23:02 ` [patch 4/7] reiserfs: fix usage of signed ints for block numbers Jeff Mahoney
2007-10-16 23:02 ` Jeff Mahoney [this message]
2007-10-16 23:02 ` [patch 6/7] reiserfs: remove first_zero_hint Jeff Mahoney
2007-10-18 18:02   ` Jeff Mahoney
2007-10-16 23:02 ` [patch 7/7] reiserfs: ignore on disk s_bmap_nr value Jeff Mahoney
2007-10-17 22:19   ` Andrew Morton
2007-10-17 22:11 ` [patch 0/7] reiserfs fixes patch set Andrew Morton
2007-10-17 22:19   ` Linus Torvalds
2007-10-17 23:23   ` Jeff Mahoney

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=20071016230258.847418000@suse.com \
    --to=jeffm@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.