]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
shrinker-convert-remaining-shrinkers-to-count-scan-api-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 27 Jun 2013 23:52:21 +0000 (09:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:03 +0000 (16:38 +1000)
fix warnings

Cc: Dave Chinner <dchinner@redhat.com>
Cc: Glauber Costa <glommer@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kvm/mmu.c
net/sunrpc/auth.c

index 5da1964ba81f93738cc7dddfbb17fb4657c276ec..fd8b01b541e66dd8a4cfe0446025eb9a7d48dd42 100644 (file)
@@ -4393,12 +4393,12 @@ void kvm_mmu_invalidate_mmio_sptes(struct kvm *kvm)
        }
 }
 
-static long
+static unsigned long
 mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
 {
        struct kvm *kvm;
        int nr_to_scan = sc->nr_to_scan;
-       long freed = 0;
+       unsigned long freed = 0;
 
        raw_spin_lock(&kvm_lock);
 
@@ -4433,7 +4433,8 @@ mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
                        goto unlock;
                }
 
-               freed += prepare_zap_oldest_mmu_page(kvm, &invalid_list);
+               if (prepare_zap_oldest_mmu_page(kvm, &invalid_list))
+                       freed++;
                kvm_mmu_commit_zap_page(kvm, &invalid_list);
 
 unlock:
@@ -4454,7 +4455,8 @@ unlock:
 
 }
 
-static long mmu_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
+static unsigned long
+mmu_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
 {
        return percpu_counter_read_positive(&kvm_total_used_mmu_pages);
 }
index fdc012da313336129b1097aa62a2b8c0fe3014a4..495a224b7eb742c282c4c8839d69c3569b0bf894 100644 (file)
@@ -454,12 +454,12 @@ rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
 /*
  * Run memory cache shrinker.
  */
-static long
+static unsigned long
 rpcauth_cache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
 
 {
        LIST_HEAD(free);
-       long freed;
+       unsigned long freed;
 
        if ((sc->gfp_mask & GFP_KERNEL) != GFP_KERNEL)
                return SHRINK_STOP;
@@ -476,7 +476,7 @@ rpcauth_cache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
        return freed;
 }
 
-static long
+static unsigned long
 rpcauth_cache_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
 
 {