dm space map metadata: remove unused variable in brb_pop()

This change “dm space map metadata: remove unused variable in brb_pop()” in Linux kernel is authored by Mike Snitzer <snitzer [at]> on Mon Dec 14 09:26:01 2015 -0500.

dm space map metadata: remove unused variable in brb_pop()

Remove the unused struct block_op pointer that was inadvertantly
introduced, via cut-and-paste of previous brb_op() code, as part of
commit 50dd842ad.

(Cc'ing stable@ because commit 50dd842ad did)

Fixes: 50dd842ad ("dm space map metadata: fix ref counting bug when bootstrapping a new space map")
Reported-by: David Binderman <>
Signed-off-by: Mike Snitzer <>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 5121677.

There are 3 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/md/persistent-data/dm-space-map-metadata.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/md/persistent-data/dm-space-map-metadata.c b/drivers/md/persistent-data/dm-space-map-metadata.c
index fca6dbc..7e44005 100644
--- a/drivers/md/persistent-data/dm-space-map-metadata.c
+++ b/drivers/md/persistent-data/dm-space-map-metadata.c
@@ -152,12 +152,9 @@ static int brb_peek(struct bop_ring_buffer *brb, struct block_op *result)
 static int brb_pop(struct bop_ring_buffer *brb)
-	struct block_op *bop;
 	if (brb_empty(brb))
 		return -ENODATA;
-	bop = brb->bops + brb->begin;
 	brb->begin = brb_next(brb, brb->begin);
 	return 0;

The commit for this change in Linux stable tree is 5121677 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *