IB/uverbs: Fix method merging in uverbs_ioctl_merge
authorMatan Barak <matanb@mellanox.com>
Tue, 13 Feb 2018 10:18:32 +0000 (12:18 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 15 Feb 2018 21:59:45 +0000 (14:59 -0700)
commit3d89459e2ef92cc0e5a50dde868780ccda9786c1
tree4e3de7282e2980a9491cada7c10ce3b601335342
parent2f36028ce98ef8e9c04809cc20b9dc498cc1a508
IB/uverbs: Fix method merging in uverbs_ioctl_merge

Fix a bug in uverbs_ioctl_merge that looked at the object's iterator
number instead of the method's iterator number when merging methods.

While we're at it, make the uverbs_ioctl_merge code a bit more clear
and faster.

Fixes: 118620d3686b ('IB/core: Add uverbs merge trees functionality')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_ioctl_merge.c