Re: [PATCH] kevent_user: use struct kevent_mring for the page ring

Evgeniy Polyakov
2006-08-22T12:21:32Z

On Tue, Aug 22, 2006 at 12:55:04PM +0100, Christoph Hellwig (hch@infradead.org) wrote:
> Currently struct kevent_user.print is an array of unsigned long, but it's used
> as an array of pointers to struct kevent_mring everyewhere in the code.
>
> Switch it to use the real type and cast the return value from __get_free_page /
> argument to free_page.
>
>
> include/linux/kevent.h | 2 +-
> kernel/kevent/kevent_user.c | 31 +++++++++++--------------------
> 2 files changed, 12 insertions(+), 21 deletions(-)
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

I will apply this patch with small minor nit below.

> if (idx >= u->pages_in_use) {
> - u->pring[idx] = __get_free_page(GFP_KERNEL);
> + u->pring[idx] = (void *)__get_free_page(GFP_KERNEL);

Better cast it directly to (struct kevent_mring *).

If there will not be any objectsion about syscall-based initialization,
I will release new patchset tomorrow with your changes.

Thank you, Christoph.

--
Evgeniy Polyakov