From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>,
dm-devel@redhat.com, cgroups@vger.kernel.org,
linux-block@vger.kernel.org, drbd-dev@lists.linbit.com,
linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org,
linux-btrfs@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] writeback: remove {set,clear}_wb_congested
Date: Wed, 1 Jul 2020 11:06:20 +0200 [thread overview]
Message-ID: <20200701090622.3354860-3-hch@lst.de> (raw)
In-Reply-To: <20200701090622.3354860-1-hch@lst.de>
Just merge them into their only callers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/linux/backing-dev-defs.h | 14 ++------------
mm/backing-dev.c | 12 ++++++------
2 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h
index 90a7e844a098f3..cc5aa1f32b91f0 100644
--- a/include/linux/backing-dev-defs.h
+++ b/include/linux/backing-dev-defs.h
@@ -232,18 +232,8 @@ enum {
BLK_RW_SYNC = 1,
};
-void clear_wb_congested(struct bdi_writeback_congested *congested, int sync);
-void set_wb_congested(struct bdi_writeback_congested *congested, int sync);
-
-static inline void clear_bdi_congested(struct backing_dev_info *bdi, int sync)
-{
- clear_wb_congested(bdi->wb.congested, sync);
-}
-
-static inline void set_bdi_congested(struct backing_dev_info *bdi, int sync)
-{
- set_wb_congested(bdi->wb.congested, sync);
-}
+void clear_bdi_congested(struct backing_dev_info *bdi, int sync);
+void set_bdi_congested(struct backing_dev_info *bdi, int sync);
struct wb_lock_cookie {
bool locked;
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index d382272bcc3100..3ebe5144a102f2 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -1047,29 +1047,29 @@ static wait_queue_head_t congestion_wqh[2] = {
};
static atomic_t nr_wb_congested[2];
-void clear_wb_congested(struct bdi_writeback_congested *congested, int sync)
+void clear_bdi_congested(struct backing_dev_info *bdi, int sync)
{
wait_queue_head_t *wqh = &congestion_wqh[sync];
enum wb_congested_state bit;
bit = sync ? WB_sync_congested : WB_async_congested;
- if (test_and_clear_bit(bit, &congested->state))
+ if (test_and_clear_bit(bit, &bdi->wb.congested->state))
atomic_dec(&nr_wb_congested[sync]);
smp_mb__after_atomic();
if (waitqueue_active(wqh))
wake_up(wqh);
}
-EXPORT_SYMBOL(clear_wb_congested);
+EXPORT_SYMBOL(clear_bdi_congested);
-void set_wb_congested(struct bdi_writeback_congested *congested, int sync)
+void set_bdi_congested(struct backing_dev_info *bdi, int sync)
{
enum wb_congested_state bit;
bit = sync ? WB_sync_congested : WB_async_congested;
- if (!test_and_set_bit(bit, &congested->state))
+ if (!test_and_set_bit(bit, &bdi->wb.congested->state))
atomic_inc(&nr_wb_congested[sync]);
}
-EXPORT_SYMBOL(set_wb_congested);
+EXPORT_SYMBOL(set_bdi_congested);
/**
* congestion_wait - wait for a backing_dev to become uncongested
--
2.26.2
next prev parent reply other threads:[~2020-07-01 9:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 9:06 remove dead bdi congestion leftovers Christoph Hellwig
2020-07-01 9:06 ` [PATCH 1/4] drbd: remove a bogus bdi_rw_congested call Christoph Hellwig
2020-07-01 9:06 ` Christoph Hellwig [this message]
2020-07-01 9:06 ` [PATCH 3/4] writeback: remove struct bdi_writeback_congested Christoph Hellwig
2020-07-01 9:06 ` [PATCH 4/4] writeback: remove bdi->congested_fn Christoph Hellwig
2020-07-01 14:48 ` David Sterba
2020-07-02 0:38 ` Coly Li
2020-07-02 5:36 ` Song Liu
2020-07-01 16:38 ` remove dead bdi congestion leftovers Tejun Heo
2020-07-01 16:41 ` Mike Snitzer
2020-07-01 17:57 ` Matthew Wilcox
2020-07-01 18:25 ` Matthew Wilcox
2020-07-08 23:14 ` Jens Axboe
2020-07-09 5:32 ` Christoph Hellwig
2020-07-09 13:58 ` Jens Axboe
2020-07-09 14:01 ` Christoph Hellwig
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=20200701090622.3354860-3-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=dm-devel@redhat.com \
--cc=drbd-dev@lists.linbit.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-raid@vger.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 NNTP newsgroup(s).