patch-2.3.27 linux/fs/bfs/inode.c
Next file: linux/fs/binfmt_misc.c
Previous file: linux/drivers/video/atafb.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Tue Nov 9 10:02:33 1999
- Orig file:
v2.3.26/linux/fs/bfs/inode.c
- Orig date:
Sun Nov 7 16:37:34 1999
diff -u --recursive --new-file v2.3.26/linux/fs/bfs/inode.c linux/fs/bfs/inode.c
@@ -263,7 +263,7 @@
struct buffer_head * bh;
struct bfs_super_block * bfs_sb;
struct inode * inode;
- int i, imap_len;
+ int i, imap_len, bmap_len;
MOD_INC_USE_COUNT;
lock_super(s);
@@ -295,9 +295,11 @@
s->su_lasti = (bfs_sb->s_start - BFS_BSIZE)/sizeof(struct bfs_inode)
+ BFS_ROOT_INO - 1;
- s->su_bmap = kmalloc(sizeof(struct bfs_bmap) * s->su_lasti, GFP_KERNEL);
+ bmap_len = sizeof(struct bfs_bmap) * s->su_lasti;
+ s->su_bmap = kmalloc(bmap_len, GFP_KERNEL);
if (!s->su_bmap)
goto out;
+ memset(s->su_bmap, 0, bmap_len);
imap_len = s->su_lasti/8 + 1;
s->su_imap = kmalloc(imap_len, GFP_KERNEL);
if (!s->su_imap) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)