diff options
author | Matan Barak <matanb@mellanox.com> | 2017-04-18 12:03:42 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-04-20 11:44:07 -0400 |
commit | db1b5ddd53365a07a7754803bdba370ebb84ba19 (patch) | |
tree | fa4c88e908e2cdc753857fa3112925befdd3b5dd /drivers/infiniband/core/uverbs.h | |
parent | e0fcc61113c17a2eae0dea7e9e67ac71849475b5 (diff) |
IB/core: Rename uverbs event file structure
Previously, ib_uverbs_event_file was suffixed by _file as it contained
the actual file information. Since it's now only used as base struct
for ib_uverbs_async_event_file and ib_uverbs_completion_event_file,
we change its name to ib_uverbs_event_queue. This represents its
logical role better.
Fixes: 1e7710f3f656 ('IB/core: Change completion channel to use the reworked objects schema')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs.h')
-rw-r--r-- | drivers/infiniband/core/uverbs.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/infiniband/core/uverbs.h b/drivers/infiniband/core/uverbs.h index 826f82748718..a3230b6ab766 100644 --- a/drivers/infiniband/core/uverbs.h +++ b/drivers/infiniband/core/uverbs.h @@ -76,12 +76,13 @@ * an asynchronous event queue file is created and released when the * event file is closed. * - * struct ib_uverbs_event_file: One reference is held by the VFS and - * released when the file is closed. For asynchronous event files, - * another reference is held by the corresponding main context file - * and released when that file is closed. For completion event files, - * a reference is taken when a CQ is created that uses the file, and - * released when the CQ is destroyed. + * struct ib_uverbs_event_queue: Base structure for + * struct ib_uverbs_async_event_file and struct ib_uverbs_completion_event_file. + * One reference is held by the VFS and released when the file is closed. + * For asynchronous event files, another reference is held by the corresponding + * main context file and released when that file is closed. For completion + * event files, a reference is taken when a CQ is created that uses the file, + * and released when the CQ is destroyed. */ struct ib_uverbs_device { @@ -101,7 +102,7 @@ struct ib_uverbs_device { struct list_head uverbs_events_file_list; }; -struct ib_uverbs_event_file { +struct ib_uverbs_event_queue { spinlock_t lock; int is_closed; wait_queue_head_t poll_wait; @@ -110,7 +111,7 @@ struct ib_uverbs_event_file { }; struct ib_uverbs_async_event_file { - struct ib_uverbs_event_file ev_file; + struct ib_uverbs_event_queue ev_queue; struct ib_uverbs_file *uverbs_file; struct kref ref; struct list_head list; @@ -118,7 +119,7 @@ struct ib_uverbs_async_event_file { struct ib_uverbs_completion_event_file { struct ib_uobject_file uobj_file; - struct ib_uverbs_event_file ev_file; + struct ib_uverbs_event_queue ev_queue; }; struct ib_uverbs_file { @@ -191,7 +192,7 @@ struct ib_ucq_object { }; extern const struct file_operations uverbs_event_fops; -void ib_uverbs_init_event_file(struct ib_uverbs_event_file *ev_file); +void ib_uverbs_init_event_queue(struct ib_uverbs_event_queue *ev_queue); struct file *ib_uverbs_alloc_async_event_file(struct ib_uverbs_file *uverbs_file, struct ib_device *ib_dev); void ib_uverbs_free_async_event_file(struct ib_uverbs_file *uverbs_file); |