From: Jeff Xie <chongguiguzi@gmail.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
chongguiguzi@gmail.com, huan.xie@suse.com
Subject: [PATCH] block: use helper function bio_copy_dev to __bio_clone_fast
Date: Sat, 17 Oct 2020 15:37:26 +0800 [thread overview]
Message-ID: <1602920246-25131-1-git-send-email-huan.xie@suse.com> (raw)
We have introduced helper function bio_copy_dev. Just use it.
Signed-off-by: Jeff Xie <huan.xie@suse.com>
---
block/bio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/block/bio.c b/block/bio.c
index 640d0fb..9fce7df 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -679,8 +679,6 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src)
* most users will be overriding ->bi_disk with a new target,
* so we don't set nor calculate new physical/hw segment counts here
*/
- bio->bi_disk = bio_src->bi_disk;
- bio->bi_partno = bio_src->bi_partno;
bio_set_flag(bio, BIO_CLONED);
if (bio_flagged(bio_src, BIO_THROTTLED))
bio_set_flag(bio, BIO_THROTTLED);
@@ -690,7 +688,7 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src)
bio->bi_iter = bio_src->bi_iter;
bio->bi_io_vec = bio_src->bi_io_vec;
- bio_clone_blkg_association(bio, bio_src);
+ bio_copy_dev(bio, bio_src);
blkcg_bio_issue_init(bio);
}
EXPORT_SYMBOL(__bio_clone_fast);
--
1.8.3.1
reply other threads:[~2020-10-17 7:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1602920246-25131-1-git-send-email-huan.xie@suse.com \
--to=chongguiguzi@gmail.com \
--cc=axboe@kernel.dk \
--cc=huan.xie@suse.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).