OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> wrote: > Masayoshi MIZUMA <m.mizuma@xxxxxxxxxxxxxx> writes: > > > OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> wrote: > > > >> Masayoshi MIZUMA <m.mizuma@xxxxxxxxxxxxxx> writes: > >> > >> > @@ -2146,13 +2146,12 @@ int block_read_full_page(struct page *page, get_block_t *get_block) > >> > { > >> > struct inode *inode = page->mapping->host; > >> > sector_t iblock, lblock; > >> > - struct buffer_head *bh, *head, *arr[MAX_BUF_PER_PAGE]; > >> > - unsigned int blocksize; > >> > + unsigned int blocksize = 1 << inode->i_blkbits; > >> > + struct buffer_head *bh, *head, *arr[PAGE_CACHE_SIZE / blocksize]; > >> > >> In practice, we avoid to use the variable-length array on the kernel > >> stack. Although I'm not sure how important it is, there are some reasons > >> to avoid. Also sparse will warn it, IIRC. > > > > Umm... I understand the practice itself, but is there specific reason for > > the practice ? If there isn't, we don't need to avoid use it, I think. > > For example, from quick google > > http://lkml.org/lkml/2003/9/2/202 > > I guess you can find more reasons if needed. I understand it. Thanks a lot ! Thanks, Masayoshi -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html