Skip to content

Commit

Permalink
crush: always return a value from crush_bucket_choose
Browse files Browse the repository at this point in the history
Even when we encounter a corrupt bucket.  We still BUG().  This fixes
the warning

fs/ceph/crush/mapper.c: In function 'crush_choose':
fs/ceph/crush/mapper.c:352: warning: control may reach end of non-void function
'crush_bucket_choose' being inlined

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Nov 2, 2009
1 parent 63ff78b commit 33aa96e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/crush/mapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static int crush_bucket_choose(struct crush_bucket *in, int x, int r)
x, r);
default:
BUG_ON(1);
/* return in->items[0] */;
return in->items[0];
}
}

Expand Down

0 comments on commit 33aa96e

Please sign in to comment.