nfs4: make sure retry delay won't get out of bigtime_t range

This commit is contained in:
Pawel Dziepak 2013-04-09 03:40:54 +02:00
parent 75ff6e996f
commit 968cf7c83d

View File

@ -17,6 +17,8 @@
static inline bigtime_t
RetryDelay(uint32 attempt, uint32 leaseTime = 0)
{
attempt = min_c(attempt, sizeof(bigtime_t) * 8);
bigtime_t delay = (1 << (attempt - 1)) * 100000;
if (leaseTime != 0)
delay = min_c(delay, sSecToBigTime(leaseTime));