X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=fs%2Fio-wq.c;h=cf086b01c6c675d0e9c8cbef88c1ef5df00c3fb6;hb=70982eef4d7eebb47a3b1ef25ec1bc742f3a21cf;hp=843d4a7bcd6e94e1cdb0abbfa71a74211bee6046;hpb=379cf80a9861e4356792185bc3fcdd7d4133f2f7;p=linux-2.6-microblaze.git diff --git a/fs/io-wq.c b/fs/io-wq.c index 843d4a7bcd6e..cf086b01c6c6 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -731,7 +731,12 @@ static void io_wqe_enqueue(struct io_wqe *wqe, struct io_wq_work *work) int work_flags; unsigned long flags; - if (test_bit(IO_WQ_BIT_EXIT, &wqe->wq->state)) { + /* + * If io-wq is exiting for this task, or if the request has explicitly + * been marked as one that should not get executed, cancel it here. + */ + if (test_bit(IO_WQ_BIT_EXIT, &wqe->wq->state) || + (work->flags & IO_WQ_WORK_CANCEL)) { io_run_cancel(work, wqe); return; }