]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: ramster: decrease foregin pers pages when count < 0
authorWanpeng Li <liwanp@linux.vnet.ibm.com>
Fri, 12 Apr 2013 01:31:21 +0000 (09:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Apr 2013 22:14:40 +0000 (15:14 -0700)
commit 9a5c59687ad ("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>
drivers/staging/zcache/ramster/ramster.c

index c3d7f96b029a1aeb9b7fe7f9355dfc3545b5c483..444189e10895a61bf74df58c78fc90dc77147b86 100644 (file)
@@ -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);
                }
        }