From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Bart Van Assche <bvanassche@acm.org>,
Ming Lei <ming.lei@redhat.com>, Hannes Reinecke <hare@suse.de>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
John Garry <john.garry@huawei.com>,
Khazhy Kumykov <khazhy@google.com>,
Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: [PATCH v4 1/3] blk-mq: Move the elevator_exit() definition
Date: Sun, 28 Mar 2021 19:00:26 -0700 [thread overview]
Message-ID: <20210329020028.18241-2-bvanassche@acm.org> (raw)
In-Reply-To: <20210329020028.18241-1-bvanassche@acm.org>
Since elevator_exit() only has one caller, move its definition from
block/blk.h into block/elevator.c. Remove the inline keyword since modern
compilers are smart enough to decide when to inline functions that occur
in the same compilation unit.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Khazhy Kumykov <khazhy@google.com>
Cc: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk.h | 9 ---------
block/elevator.c | 8 ++++++++
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/block/blk.h b/block/blk.h
index 3b53e44b967e..e0a4a7577f6c 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -198,15 +198,6 @@ void __elevator_exit(struct request_queue *, struct elevator_queue *);
int elv_register_queue(struct request_queue *q, bool uevent);
void elv_unregister_queue(struct request_queue *q);
-static inline void elevator_exit(struct request_queue *q,
- struct elevator_queue *e)
-{
- lockdep_assert_held(&q->sysfs_lock);
-
- blk_mq_sched_free_requests(q);
- __elevator_exit(q, e);
-}
-
ssize_t part_size_show(struct device *dev, struct device_attribute *attr,
char *buf);
ssize_t part_stat_show(struct device *dev, struct device_attribute *attr,
diff --git a/block/elevator.c b/block/elevator.c
index 293c5c81397a..4b20d1ab29cc 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -197,6 +197,14 @@ void __elevator_exit(struct request_queue *q, struct elevator_queue *e)
kobject_put(&e->kobj);
}
+static void elevator_exit(struct request_queue *q, struct elevator_queue *e)
+{
+ lockdep_assert_held(&q->sysfs_lock);
+
+ blk_mq_sched_free_requests(q);
+ __elevator_exit(q, e);
+}
+
static inline void __elv_rqhash_del(struct request *rq)
{
hash_del(&rq->hash);
next prev parent reply other threads:[~2021-03-29 2:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 2:00 [PATCH v4 0/3] blk-mq: Fix a race between iterating over requests and freeing requests Bart Van Assche
2021-03-29 2:00 ` Bart Van Assche [this message]
2021-03-29 2:00 ` [PATCH v4 2/3] blk-mq: Introduce atomic variants of the tag iteration functions Bart Van Assche
2021-03-29 2:00 ` [PATCH v4 3/3] blk-mq: Fix a race between iterating over requests and freeing requests Bart Van Assche
2021-04-02 23:59 ` Khazhy Kumykov
2021-04-03 3:25 ` Bart Van Assche
2021-04-03 3:37 ` Khazhy Kumykov
2021-04-04 1:11 ` Bart Van Assche
2021-03-30 22:30 ` [PATCH v4 0/3] " Bart Van Assche
2021-04-01 0:48 ` Shinichiro Kawasaki
2021-04-01 1:55 ` Martin K. Petersen
2021-04-02 10:00 ` 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=20210329020028.18241-2-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=johannes.thumshirn@wdc.com \
--cc=john.garry@huawei.com \
--cc=khazhy@google.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=shinichiro.kawasaki@wdc.com \
/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).