Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'io_uring-5.17-2022-01-28' of git://git.kernel.dk/linux-block

Pull io_uring fixes from Jens Axboe:
"Just two small fixes this time:

- Fix a bug that can lead to node registration taking 1 second, when
it should finish much quicker (Dylan)

- Remove an unused argument from a function (Usama)"

* tag 'io_uring-5.17-2022-01-28' of git://git.kernel.dk/linux-block:
io_uring: remove unused argument from io_rsrc_node_alloc
io_uring: fix bug in slow unregistering of nodes

+8 -3
+8 -3
fs/io_uring.c
··· 7822 7822 struct io_ring_ctx *ctx = node->rsrc_data->ctx; 7823 7823 unsigned long flags; 7824 7824 bool first_add = false; 7825 + unsigned long delay = HZ; 7825 7826 7826 7827 spin_lock_irqsave(&ctx->rsrc_ref_lock, flags); 7827 7828 node->done = true; 7829 + 7830 + /* if we are mid-quiesce then do not delay */ 7831 + if (node->rsrc_data->quiesce) 7832 + delay = 0; 7828 7833 7829 7834 while (!list_empty(&ctx->rsrc_ref_list)) { 7830 7835 node = list_first_entry(&ctx->rsrc_ref_list, ··· 7843 7838 spin_unlock_irqrestore(&ctx->rsrc_ref_lock, flags); 7844 7839 7845 7840 if (first_add) 7846 - mod_delayed_work(system_wq, &ctx->rsrc_put_work, HZ); 7841 + mod_delayed_work(system_wq, &ctx->rsrc_put_work, delay); 7847 7842 } 7848 7843 7849 - static struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx) 7844 + static struct io_rsrc_node *io_rsrc_node_alloc(void) 7850 7845 { 7851 7846 struct io_rsrc_node *ref_node; 7852 7847 ··· 7897 7892 { 7898 7893 if (ctx->rsrc_backup_node) 7899 7894 return 0; 7900 - ctx->rsrc_backup_node = io_rsrc_node_alloc(ctx); 7895 + ctx->rsrc_backup_node = io_rsrc_node_alloc(); 7901 7896 return ctx->rsrc_backup_node ? 0 : -ENOMEM; 7902 7897 } 7903 7898