Christoph Hellwig <hch@xxxxxx> writes: > With the current aio code there is no need for the magic KIOCB_CANCELLED > value, as a cancelation just kicks the driver to queue the completion > ASAP, with all actual completion handling done in another thread. Given > that both the completion path and cancelation take the context lock there > is no need for magic cmpxchg loops either. The cmpxchg was made unnecessary when the complementary xchg was removed in commit bec68faaf ("aio: io_cancel() no longer returns the io_event"). There was no longer a need to ensure only the completion path or the cancellation path delivered the completion event. Now, the completion is always delivered via aio_complete. So yeah, we can get rid of this. Acked-by: Jeff Moyer <jmoyer@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html