diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-30 10:44:27 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-30 10:44:27 +0200 |
commit | 536e0e81e0b04305ce40f6cc4299d29dc9bbc673 (patch) | |
tree | 1cb7f695bc220bb9cdc5cb9ed1ef005f7771b1fd /mm/shmem.c | |
parent | c1fad9ef7ed14aad464972e6444e7a3bd5670f26 (diff) | |
parent | 53061afee43bc5041b67a45b6d793e7afdcf9ca7 (diff) | |
download | linux-536e0e81e0b04305ce40f6cc4299d29dc9bbc673.tar.bz2 |
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index fd8b2b5741b1..971fc83e6402 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -270,7 +270,7 @@ bool shmem_charge(struct inode *inode, long pages) info->alloced -= pages; shmem_recalc_inode(inode); spin_unlock_irqrestore(&info->lock, flags); - + shmem_unacct_blocks(info->flags, pages); return false; } percpu_counter_add(&sbinfo->used_blocks, pages); @@ -291,6 +291,7 @@ void shmem_uncharge(struct inode *inode, long pages) if (sbinfo->max_blocks) percpu_counter_sub(&sbinfo->used_blocks, pages); + shmem_unacct_blocks(info->flags, pages); } /* @@ -1980,7 +1981,7 @@ unsigned long shmem_get_unmapped_area(struct file *file, return addr; sb = shm_mnt->mnt_sb; } - if (SHMEM_SB(sb)->huge != SHMEM_HUGE_NEVER) + if (SHMEM_SB(sb)->huge == SHMEM_HUGE_NEVER) return addr; } |