Re: [RFC] Alternative raceless page free

Daniel Phillips
2002-09-05T16:26:09Z

On Thursday 05 September 2002 18:04, Christian Ehrhardt wrote:
> On Thu, Sep 05, 2002 at 05:21:31PM +0200, Daniel Phillips wrote:
> > On Thursday 05 September 2002 14:34, Christian Ehrhardt wrote:
> > > @@ -455,7 +458,7 @@
> > > } else {
> > > /* failed to drop the buffers so stop here */
> > > UnlockPage(page);
> > > - page_cache_release(page);
> > > + put_page(page);
> > >
> > > spin_lock(&pagemap_lru_lock);
> > > continue;
> > >
> > > looks a bit suspicious. put_page is not allowed if the page is still
> > > on the lru and there is no other reference to it. As we don't hold any
> > > locks between UnlockPage and put_page there is no formal guarantee that
> > > the above condition is met. I don't have another path that could race
> > > with this one though and chances are that there actually is none.
> >
> > The corresponding get_page is just above, you must have overlooked it.

I misspoke. You're right, page_cache_release is the appropriate function
here, not put_page. Fixed, thanks.

--
Daniel