From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <40226267.3080703@cyberone.com.au> Date: Fri, 06 Feb 2004 02:33:59 +1100 From: Nick Piggin MIME-Version: 1.0 Subject: Re: [PATCH 0/5] mm improvements References: <16416.64425.172529.550105@laputa.namesys.com> <16417.3444.377405.923166@laputa.namesys.com> <4021A6BA.5000808@cyberone.com.au> <16418.19751.234876.491644@laputa.namesys.com> <40225D1F.8090103@cyberone.com.au> <40225E0B.70200@cyberone.com.au> <16418.24401.323448.472921@laputa.namesys.com> In-Reply-To: <16418.24401.323448.472921@laputa.namesys.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Nikita Danilov Cc: Hugh Dickins , Andrew Morton , linux-mm@kvack.org List-ID: Nikita Danilov wrote: >Nick Piggin writes: > > > > > > Nick Piggin wrote: > > > > > > > > + pte_dirty = page_pte_is_dirty(page, pte_paddr); > > > + if (pte_dirty != 0) > > > + ret = pte_dirty; > > > > > > > > > Won't this leave ret in a random state? Should it be ret++? > > > > > > > ... must be past my bedtime. > > > >Well, @ret handling is kind of obscure in this function, right. > > 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++; */ ... out: return ret; Right? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: aart@kvack.org