Skip to content

Commit

Permalink
net: devlink: remove redundant net_eq() check from sb_pool_get_dumpit()
Browse files Browse the repository at this point in the history
The net_eq() check is already performed inside
devlinks_xa_for_each_registered_get() helper, so remove the redundant
appearance.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20220727055912.568391-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jiri Pirko authored and Jakub Kicinski committed Jul 28, 2022
1 parent a683dc5 commit 2bb88b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/core/devlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -2642,8 +2642,7 @@ static int devlink_nl_cmd_sb_pool_get_dumpit(struct sk_buff *msg,

mutex_lock(&devlink_mutex);
devlinks_xa_for_each_registered_get(sock_net(msg->sk), index, devlink) {
if (!net_eq(devlink_net(devlink), sock_net(msg->sk)) ||
!devlink->ops->sb_pool_get)
if (!devlink->ops->sb_pool_get)
goto retry;

devl_lock(devlink);
Expand Down

0 comments on commit 2bb88b2

Please sign in to comment.