[Devel] [PATCH RHEL7 COMMIT] cbt: remove useless rcu_dereference() -v2
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Apr 8 02:14:58 PDT 2016
The commit is pushed to "branch-rh7-3.10.0-327.10.1.vz7.12.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.10.1.vz7.12.6
------>
commit a3ce222f07ff009783a6a3c8f43c83415dda7c4c
Author: Maxim Patlasov <mpatlasov at virtuozzo.com>
Date: Fri Apr 8 13:14:58 2016 +0400
cbt: remove useless rcu_dereference() -v2
The implementation of CBT (blk-cbt.c) RCU-protects q->cbt, not cbt->map[ixd].
Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
Acked-by: Dmitry Monakhov <dmonakhov at virtuozzo.com>
---
block/blk-cbt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-cbt.c b/block/blk-cbt.c
index 7a4303f..b66f513 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);
@@ -394,7 +394,7 @@ static void cbt_find_next_extent(struct cbt_info *cbt, blkcnt_t block, struct cb
idx = block >> (PAGE_SHIFT + 3);
while (block < cbt->block_max) {
off = block & (BITS_PER_PAGE -1);
- page = rcu_dereference(cbt->map[idx]);
+ page = cbt->map[idx];
if (!page) {
if (found)
break;
More information about the Devel
mailing list