diff options
-rw-r--r-- | mm/filemap.c | 1 | ||||
-rw-r--r-- | mm/memory.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 13df01c50479..af7e2f5caea9 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1445,7 +1445,6 @@ no_cached_page: | |||
1445 | * effect. | 1445 | * effect. |
1446 | */ | 1446 | */ |
1447 | error = page_cache_read(file, pgoff); | 1447 | error = page_cache_read(file, pgoff); |
1448 | grab_swap_token(); | ||
1449 | 1448 | ||
1450 | /* | 1449 | /* |
1451 | * The page we want has now been added to the page cache. | 1450 | * The page we want has now been added to the page cache. |
diff --git a/mm/memory.c b/mm/memory.c index 156861fcac43..a07120da868b 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1991,6 +1991,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1991 | delayacct_set_flag(DELAYACCT_PF_SWAPIN); | 1991 | delayacct_set_flag(DELAYACCT_PF_SWAPIN); |
1992 | page = lookup_swap_cache(entry); | 1992 | page = lookup_swap_cache(entry); |
1993 | if (!page) { | 1993 | if (!page) { |
1994 | grab_swap_token(); /* Contend for token _before_ read-in */ | ||
1994 | swapin_readahead(entry, address, vma); | 1995 | swapin_readahead(entry, address, vma); |
1995 | page = read_swap_cache_async(entry, vma, address); | 1996 | page = read_swap_cache_async(entry, vma, address); |
1996 | if (!page) { | 1997 | if (!page) { |
@@ -2008,7 +2009,6 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2008 | /* Had to read the page from swap area: Major fault */ | 2009 | /* Had to read the page from swap area: Major fault */ |
2009 | ret = VM_FAULT_MAJOR; | 2010 | ret = VM_FAULT_MAJOR; |
2010 | count_vm_event(PGMAJFAULT); | 2011 | count_vm_event(PGMAJFAULT); |
2011 | grab_swap_token(); | ||
2012 | } | 2012 | } |
2013 | 2013 | ||
2014 | delayacct_clear_flag(DELAYACCT_PF_SWAPIN); | 2014 | delayacct_clear_flag(DELAYACCT_PF_SWAPIN); |