[PATCH] mm: Cleanup in do_shrink_slab()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Group long variables together to minimize number of occupied lines
and place all definitions in back Christmas tree order. Also,
simplify expression around batch_size: use all power of C language!

Signed-off-by: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx>
---
 mm/vmscan.c |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 9918bfc1d2f9..636657213b9b 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -445,16 +445,11 @@ EXPORT_SYMBOL(unregister_shrinker);
 static unsigned long do_shrink_slab(struct shrink_control *shrinkctl,
 				    struct shrinker *shrinker, int priority)
 {
-	unsigned long freed = 0;
+	long total_scan, freeable, nr, new_nr, next_deferred, scanned = 0;
+	long batch_size = shrinker->batch ? : SHRINK_BATCH;
 	unsigned long long delta;
-	long total_scan;
-	long freeable;
-	long nr;
-	long new_nr;
 	int nid = shrinkctl->nid;
-	long batch_size = shrinker->batch ? shrinker->batch
-					  : SHRINK_BATCH;
-	long scanned = 0, next_deferred;
+	unsigned long freed = 0;
 
 	freeable = shrinker->count_objects(shrinker, shrinkctl);
 	if (freeable == 0 || freeable == SHRINK_EMPTY)




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux