diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/bio.c | 4 | ||||
-rw-r--r-- | block/blk-cgroup.c | 23 | ||||
-rw-r--r-- | block/bsg.c | 4 |
3 files changed, 8 insertions, 23 deletions
diff --git a/block/bio.c b/block/bio.c index 8281bfcbc265..4db1008309ed 100644 --- a/block/bio.c +++ b/block/bio.c @@ -2097,8 +2097,12 @@ EXPORT_SYMBOL_GPL(bio_associate_blkg); */ void bio_clone_blkg_association(struct bio *dst, struct bio *src) { + rcu_read_lock(); + if (src->bi_blkg) __bio_associate_blkg(dst, src->bi_blkg); + + rcu_read_unlock(); } EXPORT_SYMBOL_GPL(bio_clone_blkg_association); #endif /* CONFIG_BLK_CGROUP */ diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index c8cc1cbb6370..2bed5725aa03 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -438,29 +438,6 @@ static void blkg_destroy_all(struct request_queue *q) spin_unlock_irq(&q->queue_lock); } -/* - * A group is RCU protected, but having an rcu lock does not mean that one - * can access all the fields of blkg and assume these are valid. For - * example, don't try to follow throtl_data and request queue links. - * - * Having a reference to blkg under an rcu allows accesses to only values - * local to groups like group stats and group rate limits. - */ -void __blkg_release_rcu(struct rcu_head *rcu_head) -{ - struct blkcg_gq *blkg = container_of(rcu_head, struct blkcg_gq, rcu_head); - - /* release the blkcg and parent blkg refs this blkg has been holding */ - css_put(&blkg->blkcg->css); - if (blkg->parent) - blkg_put(blkg->parent); - - wb_congested_put(blkg->wb_congested); - - blkg_free(blkg); -} -EXPORT_SYMBOL_GPL(__blkg_release_rcu); - static int blkcg_reset_stats(struct cgroup_subsys_state *css, struct cftype *cftype, u64 val) { diff --git a/block/bsg.c b/block/bsg.c index 44f6028b9567..50e5f8f666f2 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -177,6 +177,10 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode) goto out; } + pr_warn_once( + "BIDI support in bsg has been deprecated and might be removed. " + "Please report your use case to linux-scsi@vger.kernel.org\n"); + next_rq = blk_get_request(q, REQ_OP_SCSI_IN, 0); if (IS_ERR(next_rq)) { ret = PTR_ERR(next_rq); |