Skip to content

Commit

Permalink
staging: ramster: decrease foregin pers pages when count < 0
Browse files Browse the repository at this point in the history
commit 9a5c596 ("staging: ramster: Provide accessory functions for
counter decrease") forget decrease foregin pers pages, this patch fix
it.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wanpeng Li authored and Greg Kroah-Hartman committed Apr 12, 2013
1 parent c400c1e commit c067ad1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/zcache/ramster/ramster.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ void ramster_count_foreign_pages(bool eph, int count)
if (count > 0) {
inc_ramster_foreign_pers_pages();
} else {
dec_ramster_foreign_pers_pages();
WARN_ON_ONCE(ramster_foreign_pers_pages < 0);
}
}
Expand Down

0 comments on commit c067ad1

Please sign in to comment.