Re: [PATCH] 2.6.0-test10 O_DIRECT memory leak fix

From: Andrew Morton
Date: Tue Nov 25 2003 - 20:06:21 EST


Badari Pulavarty <pbadari@xxxxxxxxxx> wrote:
>
> Hi Andrew,
>
> I found the problem with O_DIRECT memory leak.
>
> The problem is, when we are doing DIO read and crossed the end of file -
> we don't release referencess on all the pages we got from get_user_pages().
> (since it is a sucess case).
>
> The fix is to call dio_cleanup() even for sucess cases. Can you please
> review this ? I tested the patch with fsstress and there are no memory leak
> problems now.

Thanks, it looks OK. Those pages haven't even been put into BIOs so I see
no problem releasing them here even if there is still async I/O in flight.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/