crush: fix dprintk compilation
authorIlya Dryomov <idryomov@gmail.com>
Thu, 16 Feb 2017 14:38:05 +0000 (15:38 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 23 Feb 2017 21:22:02 +0000 (22:22 +0100)
The syntax error was not noticed because dprintk is a macro
and the code is discarded by default.

Reflects ceph.git commit f29b840c64a933b2cb13e3da6f3d785effd73a57.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/crush/mapper.c

index 84d2de0..b5cd8c2 100644 (file)
@@ -105,7 +105,7 @@ static int bucket_perm_choose(const struct crush_bucket *bucket,
 
        /* calculate permutation up to pr */
        for (i = 0; i < work->perm_n; i++)
-               dprintk(" perm_choose have %d: %d\n", i, bucket->perm[i]);
+               dprintk(" perm_choose have %d: %d\n", i, work->perm[i]);
        while (work->perm_n <= pr) {
                unsigned int p = work->perm_n;
                /* no point in swapping the final entry */
@@ -122,7 +122,7 @@ static int bucket_perm_choose(const struct crush_bucket *bucket,
                work->perm_n++;
        }
        for (i = 0; i < bucket->size; i++)
-               dprintk(" perm_choose  %d: %d\n", i, bucket->perm[i]);
+               dprintk(" perm_choose  %d: %d\n", i, work->perm[i]);
 
        s = work->perm[pr];
 out: