On 07/12/17 08:08 AM, Christoph Hellwig wrote:
Take the RCU critical sections into the callers of to_vmem_altmap so that
we can read the page map inside the critical section. Also rename the
remaining helper to __lookup_dev_pagemap to fit into the current naming
scheme.
I'm not saying I disagree, but what's the reasoning behind the double
underscore prefix to the function?
+struct dev_pagemap *__lookup_dev_pagemap(struct page *start_page)
+{
+ struct dev_pagemap *pgmap;
+
+ pgmap = radix_tree_lookup(&pgmap_radix, page_to_pfn(start_page));
+ if (!pgmap || !pgmap->base_pfn)
+ return NULL;
+ return pgmap;
+}
I'm also wondering why we are still looking up the dev_pagemap via the
radix tree when struct page already has a pointer to it (page->pgmap).
Thanks,
Logan
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>