mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
blkcg: clean up blkg_tryget_closest()
The implementation of blkg_tryget_closest() wasn't super obvious and became a point of suspicion when debugging [1]. So let's clean it up so it's obviously not the problem. Also add missing RCU read locking to bio_clone_blkg_association(), which got exposed by adding the RCU read lock held check in blkg_tryget_closest(). [1] https://lore.kernel.org/linux-block/[email protected]/ Signed-off-by: Dennis Zhou <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
5816a0932b
commit
6ab2187992
2 changed files with 20 additions and 5 deletions
|
|
@ -2096,8 +2096,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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue