[PATCH] mm, highmem: remove useless virtual variable in page_address_map

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We can get virtual address without virtual field.
So remove it.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>

diff --git a/mm/highmem.c b/mm/highmem.c
index b32b70c..8f4c250 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -320,7 +320,6 @@ EXPORT_SYMBOL(kunmap_high);
  */
 struct page_address_map {
 	struct page *page;
-	void *virtual;
 	struct list_head list;
 };
 
@@ -362,7 +361,10 @@ void *page_address(const struct page *page)
 
 		list_for_each_entry(pam, &pas->lh, list) {
 			if (pam->page == page) {
-				ret = pam->virtual;
+				int nr;
+
+				nr = pam - page_address_map;
+				ret = PKMAP_ADDR(nr);
 				goto done;
 			}
 		}
@@ -391,7 +393,6 @@ void set_page_address(struct page *page, void *virtual)
 	if (virtual) {		/* Add */
 		pam = &page_address_maps[PKMAP_NR((unsigned long)virtual)];
 		pam->page = page;
-		pam->virtual = virtual;
 
 		spin_lock_irqsave(&pas->lock, flags);
 		list_add_tail(&pam->list, &pas->lh);
-- 
1.7.9.5

--
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>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]