Skip to contentSkip to conversation

Duplicated code in grab_cache_page, __grab_cache_page, ...

DISCUSSION Brice Goglin 1 participant 1 message Nov 13, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

I noticed a large part of code which looks duplicated in __grab_cache_page, grab_cache_page (and some parts of do_generic_file_read (in the "no_cached_page:" section)) in mm/filemap.c.

I do not see the real difference between grab_cache_page and __grab_cache_page (except the additional
"struct page *cached_page" argument).
The fact that the first one is exported while the second one is static looks strange to me.
Why not exporting both of them if the are really different ? Or why not merging them into a general purpose grab_cache_page ?

I've seen some small changes during 2.5 developpement (grab_cache_page moved to pagemap.h, __grab_cache_page got a new argument).
I'd like to know whether you planned to clean this point in future 2.5 revisions ?

Regards

--
Brice Goglin,
Laboratoire de l'Informatique du Parallelisme ENS Lyon - 46 allée d'Italie
69007 LYON - France