]> asedeno.scripts.mit.edu Git - linux.git/commit
IB/umad: Avoid additional device reference during open()/close()
authorParav Pandit <parav@mellanox.com>
Tue, 22 Jan 2019 06:33:00 +0000 (08:33 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 23 Jan 2019 18:37:05 +0000 (11:37 -0700)
commitee848721f60d87c5fd27f0a29d5fc570ff0780be
tree6f886b4f62d67b455d42f1832c149f33fd58172c
parent6113cc44015b41ca51c0a76fed82522b68108dac
IB/umad: Avoid additional device reference during open()/close()

ib_umad_init_port_dev() holds the reference of a ib_umad_device instance.
ib_umad_device contains standard core device and cdev.  cdev holds the
reference of its parent core device.  file ops holds the reference to cdev
using core kernel.

Therefore, there is no need to hold additional reference while opening
umad related char devices.

While at it, add comments to bring clarity on releasing references to
ib_umd_device.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/user_mad.c