diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-02 21:49:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-02 21:49:58 -0500 |
commit | 77d0b194b2df04a1992f882d96ff4e2bd8bb8fe0 (patch) | |
tree | 2bc1800faf8bf6712e693b5a8ea9c1fdecbe1dc7 /block | |
parent | b79f9f93eb483f2757b089bb4e1eb3827a609080 (diff) | |
parent | 427c5ce4417cba0801fbf79c8525d1330704759c (diff) |
Merge tag 'for-4.21/block-20190102' of git://git.kernel.dk/linux-block
Pull more block updates from Jens Axboe:
- Dead code removal for loop/sunvdc (Chengguang)
- Mark BIDI support for bsg as deprecated, logging a single dmesg
warning if anyone is actually using it (Christoph)
- blkcg cleanup, killing a dead function and making the tryget_closest
variant easier to read (Dennis)
- Floppy fixes, one fixing a regression in swim3 (Finn)
- lightnvm use-after-free fix (Gustavo)
- gdrom leak fix (Wenwen)
- a set of drbd updates (Lars, Luc, Nathan, Roland)
* tag 'for-4.21/block-20190102' of git://git.kernel.dk/linux-block: (28 commits)
block/swim3: Fix regression on PowerBook G3
block/swim3: Fix -EBUSY error when re-opening device after unmount
block/swim3: Remove dead return statement
block/amiflop: Don't log error message on invalid ioctl
gdrom: fix a memory leak bug
lightnvm: pblk: fix use-after-free bug
block: sunvdc: remove redundant code
block: loop: remove redundant code
bsg: deprecate BIDI support in bsg
blkcg: remove unused __blkg_release_rcu()
blkcg: clean up blkg_tryget_closest()
drbd: Change drbd_request_detach_interruptible's return type to int
drbd: Avoid Clang warning about pointless switch statment
drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire")
drbd: skip spurious timeout (ping-timeo) when failing promote
drbd: don't retry connection if peers do not agree on "authentication" settings
drbd: fix print_st_err()'s prototype to match the definition
drbd: avoid spurious self-outdating with concurrent disconnect / down
drbd: do not block when adjusting "disk-options" while IO is frozen
drbd: fix comment typos
...
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); | |||
2097 | */ | 2097 | */ |
2098 | void bio_clone_blkg_association(struct bio *dst, struct bio *src) | 2098 | void bio_clone_blkg_association(struct bio *dst, struct bio *src) |
2099 | { | 2099 | { |
2100 | rcu_read_lock(); | ||
2101 | |||
2100 | if (src->bi_blkg) | 2102 | if (src->bi_blkg) |
2101 | __bio_associate_blkg(dst, src->bi_blkg); | 2103 | __bio_associate_blkg(dst, src->bi_blkg); |
2104 | |||
2105 | rcu_read_unlock(); | ||
2102 | } | 2106 | } |
2103 | EXPORT_SYMBOL_GPL(bio_clone_blkg_association); | 2107 | EXPORT_SYMBOL_GPL(bio_clone_blkg_association); |
2104 | #endif /* CONFIG_BLK_CGROUP */ | 2108 | #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) | |||
438 | spin_unlock_irq(&q->queue_lock); | 438 | spin_unlock_irq(&q->queue_lock); |
439 | } | 439 | } |
440 | 440 | ||
441 | /* | ||
442 | * A group is RCU protected, but having an rcu lock does not mean that one | ||
443 | * can access all the fields of blkg and assume these are valid. For | ||
444 | * example, don't try to follow throtl_data and request queue links. | ||
445 | * | ||
446 | * Having a reference to blkg under an rcu allows accesses to only values | ||
447 | * local to groups like group stats and group rate limits. | ||
448 | */ | ||
449 | void __blkg_release_rcu(struct rcu_head *rcu_head) | ||
450 | { | ||
451 | struct blkcg_gq *blkg = container_of(rcu_head, struct blkcg_gq, rcu_head); | ||
452 | |||
453 | /* release the blkcg and parent blkg refs this blkg has been holding */ | ||
454 | css_put(&blkg->blkcg->css); | ||
455 | if (blkg->parent) | ||
456 | blkg_put(blkg->parent); | ||
457 | |||
458 | wb_congested_put(blkg->wb_congested); | ||
459 | |||
460 | blkg_free(blkg); | ||
461 | } | ||
462 | EXPORT_SYMBOL_GPL(__blkg_release_rcu); | ||
463 | |||
464 | static int blkcg_reset_stats(struct cgroup_subsys_state *css, | 441 | static int blkcg_reset_stats(struct cgroup_subsys_state *css, |
465 | struct cftype *cftype, u64 val) | 442 | struct cftype *cftype, u64 val) |
466 | { | 443 | { |
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) | |||
177 | goto out; | 177 | goto out; |
178 | } | 178 | } |
179 | 179 | ||
180 | pr_warn_once( | ||
181 | "BIDI support in bsg has been deprecated and might be removed. " | ||
182 | "Please report your use case to linux-scsi@vger.kernel.org\n"); | ||
183 | |||
180 | next_rq = blk_get_request(q, REQ_OP_SCSI_IN, 0); | 184 | next_rq = blk_get_request(q, REQ_OP_SCSI_IN, 0); |
181 | if (IS_ERR(next_rq)) { | 185 | if (IS_ERR(next_rq)) { |
182 | ret = PTR_ERR(next_rq); | 186 | ret = PTR_ERR(next_rq); |