From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>, Josef Bacik <josef@toxicpanda.com>,
Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>,
Matthew Sakai <msakai@redhat.com>, Chris Mason <clm@fb.com>,
David Sterba <dsterba@suse.com>,
dm-devel@lists.linux.dev, cgroups@vger.kernel.org,
linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: [PATCH 2/4] blk-cgroup: use bio_list_merge_init
Date: Thu, 28 Mar 2024 09:41:45 +0100 [thread overview]
Message-ID: <20240328084147.2954434-3-hch@lst.de> (raw)
In-Reply-To: <20240328084147.2954434-1-hch@lst.de>
Use bio_list_merge_init instead of open coding bio_list_merge and
bio_list_init.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-cgroup.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index bdbb557feb5a0e..8598e4591e7966 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -218,8 +218,7 @@ static void blkg_async_bio_workfn(struct work_struct *work)
/* as long as there are pending bios, @blkg can't go away */
spin_lock(&blkg->async_bio_lock);
- bio_list_merge(&bios, &blkg->async_bios);
- bio_list_init(&blkg->async_bios);
+ bio_list_merge_init(&bios, &blkg->async_bios);
spin_unlock(&blkg->async_bio_lock);
/* start plug only when bio_list contains at least 2 bios */
--
2.39.2
next prev parent reply other threads:[~2024-03-28 8:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 8:41 add a bio_list_merge_init helper Christoph Hellwig
2024-03-28 8:41 ` [PATCH 1/4] block: " Christoph Hellwig
2024-03-28 18:29 ` Matthew Sakai
2024-03-28 8:41 ` Christoph Hellwig [this message]
2024-03-28 8:41 ` [PATCH 3/4] dm: use bio_list_merge_init Christoph Hellwig
2024-03-29 14:01 ` Mike Snitzer
2024-03-28 8:41 ` [PATCH 4/4] btrfs " Christoph Hellwig
2024-03-28 19:16 ` David Sterba
2024-03-28 9:00 ` add a bio_list_merge_init helper Damien Le Moal
2024-03-28 12:21 ` Johannes Thumshirn
2024-03-29 18:32 ` Jens Axboe
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=20240328084147.2954434-3-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=clm@fb.com \
--cc=dm-devel@lists.linux.dev \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=msakai@redhat.com \
--cc=snitzer@kernel.org \
--cc=tj@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 read-only IMAP folder(s) and NNTP newsgroup(s).