* [PATCH 3/3] reiserfs: fix memset byte count during resize
@ 2007-08-07 15:28 Jeff Mahoney
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Mahoney @ 2007-08-07 15:28 UTC (permalink / raw)
To: ReiserFS Mailing List; +Cc: Vladimir V. Saveliev
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [patch 3/3] reiserfs: fix memset byte count during resize
2007-08-09 1:19 [patch 0/3] reiserfs: support for file systems > 8 TiB Jeff Mahoney
@ 2007-08-09 1:19 ` Jeff Mahoney
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Mahoney @ 2007-08-09 1:19 UTC (permalink / raw)
To: ReiserFS Development Mailing List; +Cc: Vladimir Saveliev
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-09 1:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-07 15:28 [PATCH 3/3] reiserfs: fix memset byte count during resize Jeff Mahoney
-- strict thread matches above, loose matches on Subject: below --
2007-08-09 1:19 [patch 0/3] reiserfs: support for file systems > 8 TiB Jeff Mahoney
2007-08-09 1:19 ` [patch 3/3] reiserfs: fix memset byte count during resize Jeff Mahoney
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.