Skip to content

Commit fed400a

Browse files
Wang Sheng-Huitorvalds
authored andcommitted
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: Wang Sheng-Hui <shhuiw@gmail.com> Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9a95f3c commit fed400a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎mm/shmem.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static bool shmem_confirm_swap(struct address_space *mapping,
293293
*/
294294
static int shmem_add_to_page_cache(struct page *page,
295295
struct address_space *mapping,
296-
pgoff_t index, gfp_t gfp, void *expected)
296+
pgoff_t index, void *expected)
297297
{
298298
int error;
299299

@@ -666,7 +666,7 @@ static int shmem_unuse_inode(struct shmem_inode_info *info,
666666
*/
667667
if (!error)
668668
error = shmem_add_to_page_cache(*pagep, mapping, index,
669-
GFP_NOWAIT, radswap);
669+
radswap);
670670
if (error != -ENOMEM) {
671671
/*
672672
* Truncation and eviction use free_swap_and_cache(), which
@@ -1112,7 +1112,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
11121112
gfp & GFP_RECLAIM_MASK);
11131113
if (!error) {
11141114
error = shmem_add_to_page_cache(page, mapping, index,
1115-
gfp, swp_to_radix_entry(swap));
1115+
swp_to_radix_entry(swap));
11161116
/*
11171117
* We already confirmed swap under page lock, and make
11181118
* no memory allocation here, so usually no possibility
@@ -1175,7 +1175,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
11751175
error = radix_tree_maybe_preload(gfp & GFP_RECLAIM_MASK);
11761176
if (!error) {
11771177
error = shmem_add_to_page_cache(page, mapping, index,
1178-
gfp, NULL);
1178+
NULL);
11791179
radix_tree_preload_end();
11801180
}
11811181
if (error) {

0 commit comments

Comments
 (0)