Andrey Turkin andrey.turkin@gmail.com writes:
+struct compl_map *create_completion_map( obj_handle_t handle, unsigned long completion_key ) +{
- struct completion *completion;
- struct compl_map *map;
- if ((completion = get_completion_obj( current->process, handle, IO_COMPLETION_MODIFY_STATE )) == NULL)
return NULL;
- if ((map = mem_alloc( sizeof(*map) )) == NULL)
- {
release_object( completion );
return NULL;
- }
- map->completion = completion;
- map->completion_key = completion_key;
- return map;
+}
There doesn't seem to be a need for a separate compl_map type here, you could just as well store the completion object in the fd structure directly.