Commit fed400a1 authored by Wang Sheng-Hui's avatar Wang Sheng-Hui Committed by Linus Torvalds

mm/shmem.c: remove the unused gfp arg to shmem_add_to_page_cache()

The gfp arg is not used in shmem_add_to_page_cache.  Remove this unused
arg.
Signed-off-by: default avatarWang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: default avatarHugh Dickins <hughd@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9a95f3cf
...@@ -293,7 +293,7 @@ static bool shmem_confirm_swap(struct address_space *mapping, ...@@ -293,7 +293,7 @@ static bool shmem_confirm_swap(struct address_space *mapping,
*/ */
static int shmem_add_to_page_cache(struct page *page, static int shmem_add_to_page_cache(struct page *page,
struct address_space *mapping, struct address_space *mapping,
pgoff_t index, gfp_t gfp, void *expected) pgoff_t index, void *expected)
{ {
int error; int error;
...@@ -666,7 +666,7 @@ static int shmem_unuse_inode(struct shmem_inode_info *info, ...@@ -666,7 +666,7 @@ static int shmem_unuse_inode(struct shmem_inode_info *info,
*/ */
if (!error) if (!error)
error = shmem_add_to_page_cache(*pagep, mapping, index, error = shmem_add_to_page_cache(*pagep, mapping, index,
GFP_NOWAIT, radswap); radswap);
if (error != -ENOMEM) { if (error != -ENOMEM) {
/* /*
* Truncation and eviction use free_swap_and_cache(), which * Truncation and eviction use free_swap_and_cache(), which
...@@ -1112,7 +1112,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index, ...@@ -1112,7 +1112,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
gfp & GFP_RECLAIM_MASK); gfp & GFP_RECLAIM_MASK);
if (!error) { if (!error) {
error = shmem_add_to_page_cache(page, mapping, index, error = shmem_add_to_page_cache(page, mapping, index,
gfp, swp_to_radix_entry(swap)); swp_to_radix_entry(swap));
/* /*
* We already confirmed swap under page lock, and make * We already confirmed swap under page lock, and make
* no memory allocation here, so usually no possibility * no memory allocation here, so usually no possibility
...@@ -1175,7 +1175,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index, ...@@ -1175,7 +1175,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
error = radix_tree_maybe_preload(gfp & GFP_RECLAIM_MASK); error = radix_tree_maybe_preload(gfp & GFP_RECLAIM_MASK);
if (!error) { if (!error) {
error = shmem_add_to_page_cache(page, mapping, index, error = shmem_add_to_page_cache(page, mapping, index,
gfp, NULL); NULL);
radix_tree_preload_end(); radix_tree_preload_end();
} }
if (error) { if (error) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment