From: jeffm@suse.com
To: ReiserFS Development Mailing List <reiserfs-devel@vger.kernel.org>
Cc: Vladimir Saveliev <vs@namesys.com>
Subject: [patch 3/3 (right version)] reiserfs: fix memset byte count during resize
Date: Wed, 08 Aug 2007 21:32:50 -0400 [thread overview]
Message-ID: <20070809013428.426984951@suse.com> (raw)
In-Reply-To: 20070809013247.791820925@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
prev parent reply other threads:[~2007-08-09 1:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-09 1:32 [patch 0/3 (right version)] reiserfs: support for file systems > 8 TiB (right version) jeffm
2007-08-09 1:32 ` [patch 1/3 (right version)] reiserfs: fix usage of signed ints for block numbers jeffm
2007-08-09 1:32 ` [patch 2/3 (right version)] reiserfs: ignore s_bmap_nr on disk for file systems >= 8 TiB jeffm
2007-08-09 1:32 ` jeffm [this message]
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=20070809013428.426984951@suse.com \
--to=jeffm@suse.com \
--cc=reiserfs-devel@vger.kernel.org \
--cc=vs@namesys.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.