]> www.infradead.org Git - users/hch/block.git/commitdiff
move blk_wake_io_task next to wake_up_process remove-blk_needs_flush_plug
authorChristoph Hellwig <hch@lst.de>
Tue, 11 Jan 2022 09:15:33 +0000 (10:15 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 11 Jan 2022 09:15:33 +0000 (10:15 +0100)
There is nothing block layer specific in blk_wake_io_task, so move it next
to wake_up_process and lose the blk_ prefix.

Signed-off-by: Christoph Hellwig <hch@lst.de>
block/fops.c
fs/iomap/direct-io.c
include/linux/blkdev.h
include/linux/sched.h
mm/page_io.c

index 4d0e220f379e18ab659b4f4b1dd9effe2c05718c..533a88d32d3f5422765f2c72186b5eb322727636 100644 (file)
@@ -48,7 +48,7 @@ static void blkdev_bio_end_io_simple(struct bio *bio)
        struct task_struct *waiter = bio->bi_private;
 
        WRITE_ONCE(bio->bi_private, NULL);
-       blk_wake_io_task(waiter);
+       wake_io_task(waiter);
 }
 
 static ssize_t __blkdev_direct_IO_simple(struct kiocb *iocb,
@@ -169,7 +169,7 @@ static void blkdev_bio_end_io(struct bio *bio)
                        struct task_struct *waiter = dio->waiter;
 
                        WRITE_ONCE(dio->waiter, NULL);
-                       blk_wake_io_task(waiter);
+                       wake_io_task(waiter);
                }
        }
 
index 03ea367df19a479a99b062860ee207b0b049a432..19bcfd6d3c8c2b978c84f704f29c754ab807d755 100644 (file)
@@ -155,7 +155,7 @@ static void iomap_dio_bio_end_io(struct bio *bio)
                if (dio->wait_for_completion) {
                        struct task_struct *waiter = dio->submit.waiter;
                        WRITE_ONCE(dio->submit.waiter, NULL);
-                       blk_wake_io_task(waiter);
+                       wake_io_task(waiter);
                } else if (dio->flags & IOMAP_DIO_WRITE) {
                        struct inode *inode = file_inode(dio->iocb->ki_filp);
 
index 56351ac489096ff36c4c0cd21ee28a2b1081e445..f0054c0ea016a7eed1fcfe8b475ba2f68b15aa8b 100644 (file)
@@ -1230,19 +1230,6 @@ extern int bdev_read_page(struct block_device *, sector_t, struct page *);
 extern int bdev_write_page(struct block_device *, sector_t, struct page *,
                                                struct writeback_control *);
 
-static inline void blk_wake_io_task(struct task_struct *waiter)
-{
-       /*
-        * If we're polling, the task itself is doing the completions. For
-        * that case, we don't need to signal a wakeup, it's enough to just
-        * mark us as RUNNING.
-        */
-       if (waiter == current)
-               __set_current_state(TASK_RUNNING);
-       else
-               wake_up_process(waiter);
-}
-
 unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
                unsigned int op);
 void disk_end_io_acct(struct gendisk *disk, unsigned int op,
index 78c351e35fec6361973c86c1a1337080af7a688a..0c2b7f59ed5c9ed4388f5ff321fd8b6c62cb9aca 100644 (file)
@@ -1911,6 +1911,19 @@ extern int wake_up_state(struct task_struct *tsk, unsigned int state);
 extern int wake_up_process(struct task_struct *tsk);
 extern void wake_up_new_task(struct task_struct *tsk);
 
+static inline void wake_io_task(struct task_struct *waiter)
+{
+       /*
+        * If we're polling, the task itself is doing the completions. For
+        * that case, we don't need to signal a wakeup, it's enough to just
+        * mark us as RUNNING.
+        */
+       if (waiter == current)
+               __set_current_state(TASK_RUNNING);
+       else
+               wake_up_process(waiter);
+}
+
 #ifdef CONFIG_SMP
 extern void kick_process(struct task_struct *tsk);
 #else
index 9725c7e1eeea13f60d95782b0fdd5a7b7559c878..b7603da53b0b70b397fe3225f7dd644a702dac5f 100644 (file)
@@ -119,7 +119,7 @@ out:
        WRITE_ONCE(bio->bi_private, NULL);
        bio_put(bio);
        if (waiter) {
-               blk_wake_io_task(waiter);
+               wake_io_task(waiter);
                put_task_struct(waiter);
        }
 }