diff options
author | Paul Mackerras <paulus@samba.org> | 2008-03-13 15:26:33 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-03-13 15:26:33 +1100 |
commit | bed04a4413376265746053be2a9cfbfc80c98ec9 (patch) | |
tree | 8f582294a655f70496cd08aedeb86de31dbad140 /mm/shmem.c | |
parent | e37c772e36a7943b2e0bd8f48312e78474c0df15 (diff) | |
parent | c463be3520065ef8c05e3cbdf946c69604e91ceb (diff) | |
download | blackbird-op-linux-bed04a4413376265746053be2a9cfbfc80c98ec9.tar.gz blackbird-op-linux-bed04a4413376265746053be2a9cfbfc80c98ec9.zip |
Merge branch 'linux-2.6'
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 90b576cbc06e..3372bc579e89 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1370,14 +1370,17 @@ repeat: shmem_swp_unmap(entry); spin_unlock(&info->lock); unlock_page(swappage); - page_cache_release(swappage); if (error == -ENOMEM) { /* allow reclaim from this memory cgroup */ - error = mem_cgroup_cache_charge(NULL, + error = mem_cgroup_cache_charge(swappage, current->mm, gfp & ~__GFP_HIGHMEM); - if (error) + if (error) { + page_cache_release(swappage); goto failed; + } + mem_cgroup_uncharge_page(swappage); } + page_cache_release(swappage); goto repeat; } } else if (sgp == SGP_READ && !filepage) { |