[Devel] [PATCH rh7] cbt: remove useless rcu_dereference()

Maxim Patlasov mpatlasov at virtuozzo.com
Tue Apr 5 18:25:19 PDT 2016


The implementation of CBT (blk-cbt.c) RCU-protects q->cbt, not cbt->map[ixd].

Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
---
 block/blk-cbt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-cbt.c b/block/blk-cbt.c
index 7a4303f..142d776 100644
--- a/block/blk-cbt.c
+++ b/block/blk-cbt.c
@@ -96,7 +96,7 @@ static int __blk_cbt_set(struct cbt_info  *cbt, blkcnt_t block,
 		unsigned long len = min_t(unsigned long, BITS_PER_PAGE - off,
 					  count);
 
-		page = rcu_dereference(cbt->map[idx]);
+		page = cbt->map[idx];
 		if (page) {
 			spin_lock_page(page);
 			set_bits(page_address(page), off, len, set);



More information about the Devel mailing list