]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
block: add kblockd_schedule_work_on()
authorJens Axboe <axboe@fb.com>
Wed, 24 Aug 2016 21:52:48 +0000 (15:52 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 29 Aug 2016 14:13:21 +0000 (08:13 -0600)
Add a helper to schedule a regular struct work on a particular CPU.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c
include/linux/blkdev.h

index 36c7ac328d8c17bd1967f898c91ff49f7a9b050d..2d08597533a438cc57575e5984a0d19409e1245b 100644 (file)
@@ -3097,6 +3097,12 @@ int kblockd_schedule_work(struct work_struct *work)
 }
 EXPORT_SYMBOL(kblockd_schedule_work);
 
+int kblockd_schedule_work_on(int cpu, struct work_struct *work)
+{
+       return queue_work_on(cpu, kblockd_workqueue, work);
+}
+EXPORT_SYMBOL(kblockd_schedule_work_on);
+
 int kblockd_schedule_delayed_work(struct delayed_work *dwork,
                                  unsigned long delay)
 {
index e79055c8b577995c1a668f8ab228aa0e593c3432..69aae720f4ef382e426199ab2215220f5fb7509e 100644 (file)
@@ -1440,8 +1440,8 @@ static inline bool req_gap_front_merge(struct request *req, struct bio *bio)
        return bio_will_gap(req->q, bio, req->bio);
 }
 
-struct work_struct;
 int kblockd_schedule_work(struct work_struct *work);
+int kblockd_schedule_work_on(int cpu, struct work_struct *work);
 int kblockd_schedule_delayed_work(struct delayed_work *dwork, unsigned long delay);
 int kblockd_schedule_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned long delay);