|
15 | 15 | #include "io_uring.h"
|
16 | 16 | #include "openclose.h"
|
17 | 17 | #include "rsrc.h"
|
18 |
| -#include "notif.h" |
19 | 18 |
|
20 | 19 | struct io_rsrc_update {
|
21 | 20 | struct file *file;
|
@@ -741,50 +740,13 @@ static int io_files_update(struct io_kiocb *req, unsigned int issue_flags)
|
741 | 740 | return IOU_OK;
|
742 | 741 | }
|
743 | 742 |
|
744 |
| -static int io_notif_update(struct io_kiocb *req, unsigned int issue_flags) |
745 |
| -{ |
746 |
| - struct io_rsrc_update *up = io_kiocb_to_cmd(req, struct io_rsrc_update); |
747 |
| - struct io_ring_ctx *ctx = req->ctx; |
748 |
| - unsigned len = up->nr_args; |
749 |
| - unsigned idx_end, idx = up->offset; |
750 |
| - int ret = 0; |
751 |
| - |
752 |
| - io_ring_submit_lock(ctx, issue_flags); |
753 |
| - if (unlikely(check_add_overflow(idx, len, &idx_end))) { |
754 |
| - ret = -EOVERFLOW; |
755 |
| - goto out; |
756 |
| - } |
757 |
| - if (unlikely(idx_end > ctx->nr_notif_slots)) { |
758 |
| - ret = -EINVAL; |
759 |
| - goto out; |
760 |
| - } |
761 |
| - |
762 |
| - for (; idx < idx_end; idx++) { |
763 |
| - struct io_notif_slot *slot = &ctx->notif_slots[idx]; |
764 |
| - |
765 |
| - if (!slot->notif) |
766 |
| - continue; |
767 |
| - if (up->arg) |
768 |
| - slot->tag = up->arg; |
769 |
| - io_notif_slot_flush_submit(slot, issue_flags); |
770 |
| - } |
771 |
| -out: |
772 |
| - io_ring_submit_unlock(ctx, issue_flags); |
773 |
| - if (ret < 0) |
774 |
| - req_set_fail(req); |
775 |
| - io_req_set_res(req, ret, 0); |
776 |
| - return IOU_OK; |
777 |
| -} |
778 |
| - |
779 | 743 | int io_rsrc_update(struct io_kiocb *req, unsigned int issue_flags)
|
780 | 744 | {
|
781 | 745 | struct io_rsrc_update *up = io_kiocb_to_cmd(req, struct io_rsrc_update);
|
782 | 746 |
|
783 | 747 | switch (up->type) {
|
784 | 748 | case IORING_RSRC_UPDATE_FILES:
|
785 | 749 | return io_files_update(req, issue_flags);
|
786 |
| - case IORING_RSRC_UPDATE_NOTIF: |
787 |
| - return io_notif_update(req, issue_flags); |
788 | 750 | }
|
789 | 751 | return -EINVAL;
|
790 | 752 | }
|
|
0 commit comments