diff options
-rw-r--r-- | mm/shmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index aec5b492d947..971fc83e6402 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -270,7 +270,7 @@ bool shmem_charge(struct inode *inode, long pages) | |||
270 | info->alloced -= pages; | 270 | info->alloced -= pages; |
271 | shmem_recalc_inode(inode); | 271 | shmem_recalc_inode(inode); |
272 | spin_unlock_irqrestore(&info->lock, flags); | 272 | spin_unlock_irqrestore(&info->lock, flags); |
273 | 273 | shmem_unacct_blocks(info->flags, pages); | |
274 | return false; | 274 | return false; |
275 | } | 275 | } |
276 | percpu_counter_add(&sbinfo->used_blocks, pages); | 276 | percpu_counter_add(&sbinfo->used_blocks, pages); |
@@ -291,6 +291,7 @@ void shmem_uncharge(struct inode *inode, long pages) | |||
291 | 291 | ||
292 | if (sbinfo->max_blocks) | 292 | if (sbinfo->max_blocks) |
293 | percpu_counter_sub(&sbinfo->used_blocks, pages); | 293 | percpu_counter_sub(&sbinfo->used_blocks, pages); |
294 | shmem_unacct_blocks(info->flags, pages); | ||
294 | } | 295 | } |
295 | 296 | ||
296 | /* | 297 | /* |