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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:51:56 +0000 (07:51 +0200)
commitcdd37f48d6a09caa30f35b3068e0922e604d8408
tree9355cddb60f6e99759296af6d843da73a81121d9
parent44ef222ad099c0293e360eaba84193b9ad467a5d
IB/uverbs: Fix method merging in uverbs_ioctl_merge

[ Upstream commit 3d89459e2ef92cc0e5a50dde868780ccda9786c1 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/uverbs_ioctl_merge.c