Messages in this thread |  | | | From | Jeff Moyer <> | | Subject | Re: [patch] aio: Don't zero out the pages array inside struct dio | | Date | Fri, 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
|  |