From 33aa96e7430d215e2ee779f65cdad0f6d4571fe1 Mon Sep 17 00:00:00 2001
From: Sage Weil <sage@newdream.net>
Date: Sun, 1 Nov 2009 17:53:24 -0800
Subject: [PATCH] crush: always return a value from crush_bucket_choose

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>
---
 fs/ceph/crush/mapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/crush/mapper.c b/fs/ceph/crush/mapper.c
index c268393adfcb..54f3f402af60 100644
--- a/fs/ceph/crush/mapper.c
+++ b/fs/ceph/crush/mapper.c
@@ -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];
 	}
 }
 
-- 
GitLab