On Mon, 2013-07-08 at 08:33 -0400, adheer.chandravanshi@xxxxxxxxxx wrote: > + /* wait until next relogin is triggered using DF_RELOGIN and > + * clear DF_RELOGIN to avoid invocation of further relogin > + */ > + wtime = jiffies + (HZ * RELOGIN_TOV); > + do { > + if (test_and_clear_bit(DF_RELOGIN, &ddb_entry->flags)) > + goto ddb_logout_init; > + > + schedule_timeout_uninterruptible(HZ); > + } while ((time_after(wtime, jiffies))); This looks a bit like a hand rolled wait_event_timeout() couldn't you use the linux primitives? James -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html