Re: [PATCH] fix page leak during core dump

David Howells
2007-03-31T12:59:56Z

Hugh Dickins <hugh@veritas.com> wrote:

> No, I think that's wrong: whereas the binfmt_elf one did its
> page_cache_release down below at the bottom of the block, this
> version does it in each subblock,

All but the first, which is why there's not a common one post if-complex.

> so there you're removing the dump_seek success one. Can't we preserve that
> beauteous macro here and just do...
> ...
> - DUMP_SEEK(file->f_pos + PAGE_SIZE);
> page_cache_release(page);
> + DUMP_SEEK(file->f_pos + PAGE_SIZE);

Actually, that works just as well, I think. I like it better than my
suggestion (see email in response to Andrew).

David