Messages in this thread | | | Date | Wed, 19 Dec 2007 00:54:23 +0100 | From | Nick Piggin <> | Subject | Re: [PATCH 2/9] readahead: clean up and simplify the code for filemap page fault readahead |
| |
On Tue, Dec 18, 2007 at 07:50:33PM +0800, Fengguang Wu wrote: > On Tue, Dec 18, 2007 at 09:19:07AM +0100, Nick Piggin wrote: > > On Sun, Dec 16, 2007 at 07:59:30PM +0800, Fengguang Wu wrote: > > > > + read_lock_irq(&mapping->tree_lock); > > > + page = radix_tree_lookup(&mapping->page_tree, offset); > > > + if (likely(page)) { > > > + int got_lock, uptodate; > > > + page_cache_get(page); > > > + > > > + got_lock = !TestSetPageLocked(page); > > > + uptodate = PageUptodate(page); > > > + read_unlock_irq(&mapping->tree_lock); > > > > If we could avoid open coding tree_lock here (and expanding its coverage > > to PageUptodate), that would be nice. I don't think it gains us too much. > > To use find_get_page()? That would be nice to me, too.
Exactly.
| |