devlink: update the code in netns move to latest helpers
authorJakub Kicinski <kuba@kernel.org>
Fri, 6 Jan 2023 06:33:55 +0000 (22:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Jan 2023 12:56:18 +0000 (12:56 +0000)
commit7a54a5195b2a877a972ec21a5ca415c1fc2aec61
treec90f07d1452bf03b1f6fd4b39c5894c05eb1fa7f
parentd772781964415c63759572b917e21c4f7ec08d9f
devlink: update the code in netns move to latest helpers

devlink_pernet_pre_exit() is the only obvious place which takes
the instance lock without using the devl_ helpers. Update the code
and move the error print after releasing the reference
(having unlock and put together feels slightly idiomatic).

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/devlink/core.c