All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: ReiserFS Development Mailing List <reiserfs-devel@vger.kernel.org>
Cc: Vladimir Saveliev <vs@namsys.com>
Subject: [patch 3/3] reiserfs: fix memset byte count during resize
Date: Wed, 08 Aug 2007 21:19:27 -0400	[thread overview]
Message-ID: <20070809012233.939127931@suse.com> (raw)
In-Reply-To: 20070809011924.576171089@suse.com

[-- Attachment #1: reiserfs-fix-resize-meminit.diff --]
[-- Type: text/plain, Size: 899 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-08-07 11:07:15.000000000 -0400
+++ b/fs/reiserfs/resize.c	2007-08-07 11:07:25.000000000 -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];
 

-- 
Jeff Mahoney
SUSE Labs


  parent reply	other threads:[~2007-08-09  1:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09  1:19 [patch 0/3] reiserfs: support for file systems > 8 TiB Jeff Mahoney
2007-08-09  1:19 ` [patch 1/3] reiserfs: fix usage of signed ints for block numbers Jeff Mahoney
2007-08-09  1:19 ` [patch 2/3] reiserfs: ignore s_bmap_nr on disk for file systems >= 8 TiB Jeff Mahoney
2007-08-09  1:19 ` Jeff Mahoney [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-07 15:28 [PATCH 3/3] reiserfs: fix memset byte count during resize 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=20070809012233.939127931@suse.com \
    --to=jeffm@suse.com \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=vs@namsys.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 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.