Skip to contentSkip to conversation

mm, thp: extract the common code from add_to_page_cache_locked

PATCH New Ning Qu 1 participant 1 message Oct 21, 2013

Subsystems (3)
lore
Share & tools
lore

Ning Qu

author
#0 lore raw

PATCH v2 1/13 mm, thp: extract the common code from add_to_page_cache_locked

Extract the common code from add_to_page_cache_locked so that it could be shared by shmem file system.

---
 include/linux/pagemap.h |  2 ++
 mm/filemap.c            | 91 ++++++++++++++++++++++++++++++++-----------------
 2 files changed, 61 insertions(+), 32 deletions(-)
include/linux/pagemap.h +2 -0
index 8ce130f..1887255 100644
@@ -548,6 +548,8 @@ static inline int fault_in_multipages_readable(const char __user *uaddr,
 	return ret;
 }
 
+int __add_to_page_cache_locked(struct page *page, struct address_space *mapping,
+				pgoff_t index);
 int add_to_page_cache_locked(struct page *page, struct address_space *mapping,
 				pgoff_t index, gfp_t gfp_mask);
 int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
mm/filemap.c +59 -32

126 lines not on this page · raw message

Signature · 7 lines
1.8.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>