Skip to content

Commit 4028182

Browse files
jpirkodavem330
authored andcommitted
devlink: don't do reporter recovery if the state is healthy
If reporter state is healthy, don't call into a driver for recover and don't increase recovery count. Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1635520 commit 4028182

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/core/devlink.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4851,6 +4851,9 @@ devlink_health_reporter_recover(struct devlink_health_reporter *reporter,
48514851
{
48524852
int err;
48534853

4854+
if (reporter->health_state == DEVLINK_HEALTH_REPORTER_STATE_HEALTHY)
4855+
return 0;
4856+
48544857
if (!reporter->ops->recover)
48554858
return -EOPNOTSUPP;
48564859

0 commit comments

Comments
 (0)