On Wed 01-06-22 10:42:32, Christoph Hellwig wrote:
On Wed, Jun 01, 2022 at 06:34:05PM +0200, Jan Kara wrote:
--- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1975,10 +1975,9 @@ EXPORT_SYMBOL_GPL(bio_associate_blkg); void bio_clone_blkg_association(struct bio *dst, struct bio *src) { if (src->bi_blkg) {
rcu_read_lock();
bio_associate_blkg_from_css(dst, bio_blkcg_css(src));
rcu_read_unlock();
What do we even need the rcu critical section here?
Good question. I've just blindly copied it from bio_associate_blkg() but bio_blkcg_css(src) is safe without RCU (we hold object references for all the dereferences) and bio_associate_blkg_from_css() takes RCU lock in blkg_tryget_closest() which is the only place where it needs it. So no, we don't need the RCU lock there. Thanks for noticing. I'll send V2 shortly with your change and the added tags.
Otherwise looks good:
Reviewed-by: Christoph Hellwig hch@lst.de
Thanks for review!
Honza