From: Andrew Morton Date: Fri, 7 Jun 2013 00:08:32 +0000 (+1000) Subject: shrinker-convert-remaining-shrinkers-to-count-scan-api-fix X-Git-Tag: next-20130607~2^2~275 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=96d8f6ec54c8ac07188cf32d0d9a17420b27111d;p=karo-tx-linux.git shrinker-convert-remaining-shrinkers-to-count-scan-api-fix fix warnings Cc: Dave Chinner Cc: Glauber Costa Signed-off-by: Andrew Morton --- diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 422493dc3848..c1dea25e5eec 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -4213,12 +4213,12 @@ restart: spin_unlock(&kvm->mmu_lock); } -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); @@ -4246,7 +4246,8 @@ mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) idx = srcu_read_lock(&kvm->srcu); spin_lock(&kvm->mmu_lock); - 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); spin_unlock(&kvm->mmu_lock); @@ -4266,7 +4267,7 @@ mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) } -static long +static unsigned long mmu_shrink_count(struct shrinker *shrink, struct shrink_control *sc) { return percpu_counter_read_positive(&kvm_total_used_mmu_pages); diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index fdc012da3133..495a224b7eb7 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -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) {