Repository navigation
Commit bec68fa
aio: io_cancel() no longer returns the io_event
Originally, io_event() was documented to return the io_event if
cancellation succeeded - the io_event wouldn't be delivered via the ring
buffer like it normally would.
But this isn't what the implementation was actually doing; the only
driver implementing cancellation, the usb gadget code, never returned an
io_event in its cancel function. And aio_complete() was recently changed
to no longer suppress event delivery if the kiocb had been cancelled.
This gets rid of the unused io_event argument to kiocb_cancel() and
kiocb->ki_cancel(), and changes io_cancel() to return -EINPROGRESS if
kiocb->ki_cancel() returned success.
Also tweak the refcounting in kiocb_cancel() to make more sense.
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: Zach Brown <zab@redhat.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Selvan Mani <smani@micron.com>
Cc: Sam Bradshaw <sbradshaw@micron.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>1 parent 723be6e commit bec68fa
3 files changed
Lines changed: 12 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
| 527 | + | |
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
544 | 543 | | |
545 | 544 | | |
546 | 545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
362 | | - | |
| 361 | + | |
363 | 362 | | |
364 | 363 | | |
365 | 364 | | |
| |||
381 | 380 | | |
382 | 381 | | |
383 | 382 | | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
| 383 | + | |
388 | 384 | | |
389 | 385 | | |
| 386 | + | |
390 | 387 | | |
391 | 388 | | |
392 | 389 | | |
| |||
408 | 405 | | |
409 | 406 | | |
410 | 407 | | |
411 | | - | |
412 | 408 | | |
413 | 409 | | |
414 | 410 | | |
| |||
419 | 415 | | |
420 | 416 | | |
421 | 417 | | |
422 | | - | |
| 418 | + | |
423 | 419 | | |
424 | 420 | | |
425 | 421 | | |
| |||
795 | 791 | | |
796 | 792 | | |
797 | 793 | | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | 794 | | |
814 | 795 | | |
815 | 796 | | |
| |||
862 | 843 | | |
863 | 844 | | |
864 | 845 | | |
865 | | - | |
866 | 846 | | |
867 | 847 | | |
868 | 848 | | |
| |||
1439 | 1419 | | |
1440 | 1420 | | |
1441 | 1421 | | |
1442 | | - | |
1443 | 1422 | | |
1444 | 1423 | | |
1445 | 1424 | | |
| |||
1457 | 1436 | | |
1458 | 1437 | | |
1459 | 1438 | | |
1460 | | - | |
| 1439 | + | |
1461 | 1440 | | |
1462 | 1441 | | |
1463 | 1442 | | |
1464 | 1443 | | |
1465 | 1444 | | |
1466 | 1445 | | |
1467 | | - | |
1468 | | - | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
1469 | 1450 | | |
1470 | | - | |
1471 | | - | |
| 1451 | + | |
1472 | 1452 | | |
1473 | 1453 | | |
1474 | 1454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments