Messages in this thread |  | | | Subject | Re: [PATCH 2/7] omfs: add inode routines | | From | Andi Kleen <> | | Date | 27 Mar 2008 07:13:50 +0100 | |
Bob Copeland <me@bobcopeland.com> writes:
> +
> + bitmap_size = (sbi->s_num_blocks + 7) / 8;
> + array_size = (bitmap_size + sb->s_blocksize - 1) / sb->s_blocksize;
> +
> + sbi->s_imap_size = array_size;
> + sbi->s_imap = kzalloc(array_size * sizeof(unsigned long), GFP_KERNEL);
If the array can be really 300k you should probably have a vmalloc fallback
here.
-Andi
|  |