summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/alloc.c
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-06-17 10:19:39 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-06-17 10:19:38 -0700
commit4e933027e6848a194b03aa35c26bc20fe06205e9 (patch)
treeab1dda795bb590c589a5af45f0692b3b6f3c3931 /drivers/md/bcache/alloc.c
parentc176a066dfd36e31ebaf2796a12b2c523e7083dc (diff)
parent5ef154a26639ad07ed3ebdaea1dabe29065982b0 (diff)
Merge "Merge android-4.4.181 (bd858d7) into msm-4.4"
Diffstat (limited to 'drivers/md/bcache/alloc.c')
-rw-r--r--drivers/md/bcache/alloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c
index 16c3390e5d9f..d82ae445c9ee 100644
--- a/drivers/md/bcache/alloc.c
+++ b/drivers/md/bcache/alloc.c
@@ -324,10 +324,11 @@ static int bch_allocator_thread(void *arg)
* possibly issue discards to them, then we add the bucket to
* the free list:
*/
- while (!fifo_empty(&ca->free_inc)) {
+ while (1) {
long bucket;
- fifo_pop(&ca->free_inc, bucket);
+ if (!fifo_pop(&ca->free_inc, bucket))
+ break;
if (ca->discard) {
mutex_unlock(&ca->set->bucket_lock);