Re: [PATCH 0/5] mm improvements

Nick Piggin
2004-02-05T15:56:03Z

Nikita Danilov wrote:

>Nick Piggin writes:
> >
> > Yeah... I think it actually could be:
> >
> > pte_dirty = page_pte_is_dirty(page, pte_paddr);
> > if (pte_dirty < 0) {
> > ret = pte_dirty;
> > goto out;
> > }
> > ret += pte_dirty; /* if (pte_dirty) ret++; */
> >
>
>You mean so as to return number of dirty pte's, rather than just +1?
>This may be useful.
>

That wasn't my immediate problem, but rather than an 'if'.

The main thing I'm worried about is you seem to be not
handling the error case correctly.