lkml.org 
[lkml]   [2009]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
FromJeff Moyer <>
SubjectRe: [patch] aio: Don't zero out the pages array inside struct dio
DateFri, 30 Oct 2009 17:22:27 -0400
Andrew Morton <akpm@linux-foundation.org> writes:

> You forgot something:
>
> --- a/fs/direct-io.c~aio-dont-zero-out-the-pages-array-inside-struct-dio-fix
> +++ a/fs/direct-io.c
> @@ -130,6 +130,12 @@ struct dio {
> unsigned head; /* next page to process */
> unsigned tail; /* last valid page + 1 */
> int page_errors; /* errno from get_user_pages() */
> +
> + /*
> + * pages[] (and any fields placed after it) are not zeroed out at
> + * allocation time. Don't add new fields after pages[] unless you
> + * wish that they not be zeroed.
> + */
> struct page *pages[DIO_PAGES]; /* page buffer */
> };
>

Yeah, that makes sense. Thanks for adding it, Andrew. Oh, and it looks
like I botched the subject line. It should have read dio, not aio, but
I'm not sure that matters a whole lot.

Cheers,
Jeff


\
 
 \ /
  Last update: 2009-10-30 22:25    [from the cache]
©2003-2010