Lines Matching refs:table
83 struct kioctx __rcu *table[]; member
331 struct kioctx_table *table; in aio_ring_mremap() local
336 table = rcu_dereference(mm->ioctx_table); in aio_ring_mremap()
337 if (!table) in aio_ring_mremap()
340 for (i = 0; i < table->nr; i++) { in aio_ring_mremap()
343 ctx = rcu_dereference(table->table[i]); in aio_ring_mremap()
647 struct kioctx_table *table, *old; in ioctx_add_table() local
651 table = rcu_dereference_raw(mm->ioctx_table); in ioctx_add_table()
654 if (table) in ioctx_add_table()
655 for (i = 0; i < table->nr; i++) in ioctx_add_table()
656 if (!rcu_access_pointer(table->table[i])) { in ioctx_add_table()
658 rcu_assign_pointer(table->table[i], ctx); in ioctx_add_table()
671 new_nr = (table ? table->nr : 1) * 4; in ioctx_add_table()
674 table = kzalloc(sizeof(*table) + sizeof(struct kioctx *) * in ioctx_add_table()
676 if (!table) in ioctx_add_table()
679 table->nr = new_nr; in ioctx_add_table()
685 rcu_assign_pointer(mm->ioctx_table, table); in ioctx_add_table()
686 } else if (table->nr > old->nr) { in ioctx_add_table()
687 memcpy(table->table, old->table, in ioctx_add_table()
690 rcu_assign_pointer(mm->ioctx_table, table); in ioctx_add_table()
693 kfree(table); in ioctx_add_table()
694 table = old; in ioctx_add_table()
830 struct kioctx_table *table; in kill_ioctx() local
838 table = rcu_dereference_raw(mm->ioctx_table); in kill_ioctx()
839 WARN_ON(ctx != rcu_access_pointer(table->table[ctx->id])); in kill_ioctx()
840 RCU_INIT_POINTER(table->table[ctx->id], NULL); in kill_ioctx()
873 struct kioctx_table *table = rcu_dereference_raw(mm->ioctx_table); in exit_aio() local
877 if (!table) in exit_aio()
880 atomic_set(&wait.count, table->nr); in exit_aio()
884 for (i = 0; i < table->nr; ++i) { in exit_aio()
886 rcu_dereference_protected(table->table[i], true); in exit_aio()
910 kfree(table); in exit_aio()
1063 struct kioctx_table *table; in lookup_ioctx() local
1070 table = rcu_dereference(mm->ioctx_table); in lookup_ioctx()
1072 if (!table || id >= table->nr) in lookup_ioctx()
1075 id = array_index_nospec(id, table->nr); in lookup_ioctx()
1076 ctx = rcu_dereference(table->table[id]); in lookup_ioctx()