]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: fix dprintk compilation 13424/head
authorLoic Dachary <ldachary@redhat.com>
Tue, 14 Feb 2017 22:49:16 +0000 (23:49 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 14 Feb 2017 22:49:16 +0000 (23:49 +0100)
The syntax error was not noticed because dprintk is a macro
and the code is discarded by default.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/crush/mapper.c

index db71fd76d3e0a2335a33890534d11d552911c3f0..f790cb431cd6b2e8142e0d363094ff5522a4d126 100644 (file)
@@ -104,7 +104,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 */
@@ -121,7 +121,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: