If a discovery is already running (ie if the 'pending' flags is set) there is no need to restart discovery from the timeout handler. Signed-off-by: Hannes Reinecke <hare@xxxxxxxx> --- drivers/scsi/libfc/fc_disc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index 913beb5..82b1c97 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -503,10 +503,12 @@ static void fc_disc_timeout(struct work_struct *work) struct fc_disc, disc_work.work); mutex_lock(&disc->disc_mutex); - disc->pending = 1; - disc->requested = 0; + if (!disc->pending) { + disc->pending = 1; + disc->requested = 0; - fc_disc_gpn_ft_req(disc); + fc_disc_gpn_ft_req(disc); + } mutex_unlock(&disc->disc_mutex); } -- 1.8.5.6