diff options
author | Jeff Mahoney <jeffm@suse.com> | 2007-10-19 02:39:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:35 -0400 |
commit | 6c57c2c8d3862c8d5b908669654f6565da74ec19 (patch) | |
tree | d2c157ad57296e27f0d5bcc89fdb33f209b8b6c9 /fs | |
parent | d4c3d19d0c10701459f16c022ea23eff5e127747 (diff) |
reiserfs: fix memset byte count during resize
Correct 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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/reiserfs/resize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/reiserfs/resize.c b/fs/reiserfs/resize.c index 976cc7887a0d..3bec2f96242a 100644 --- a/fs/reiserfs/resize.c +++ b/fs/reiserfs/resize.c | |||
@@ -119,7 +119,7 @@ int reiserfs_resize(struct super_block *s, unsigned long block_count_new) | |||
119 | return -ENOMEM; | 119 | return -ENOMEM; |
120 | } | 120 | } |
121 | memset(bitmap, 0, | 121 | memset(bitmap, 0, |
122 | sizeof(struct reiserfs_bitmap_info) * SB_BMAP_NR(s)); | 122 | sizeof(struct reiserfs_bitmap_info) * bmap_nr_new); |
123 | for (i = 0; i < bmap_nr; i++) | 123 | for (i = 0; i < bmap_nr; i++) |
124 | bitmap[i] = old_bitmap[i]; | 124 | bitmap[i] = old_bitmap[i]; |
125 | 125 | ||