X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fpinger.c;h=1e23babad2db46cdfbb445710ccf2676b1e87d4e;hb=c56f7675bfb17b3847b38044153e86550ced3c8e;hp=a29283e81f91b9f62303d4aaf137014ba08d986e;hpb=3ee0e0908f12de97346cd5fe2996ad147adb9481;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index a29283e..1e23bab 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -40,6 +40,7 @@ #define DEBUG_SUBSYSTEM S_RPC +#include #include #include #include "ptlrpc_internal.h" @@ -151,14 +152,14 @@ static cfs_duration_t pinger_check_timeout(cfs_time_t time) struct timeout_item *item; cfs_time_t timeout = PING_INTERVAL; - /* The timeout list is a increase order sorted list */ + /* This list is sorted in increasing timeout order */ mutex_lock(&pinger_mutex); list_for_each_entry(item, &timeout_list, ti_chain) { - int ti_timeout = item->ti_timeout; - if (timeout > ti_timeout) - timeout = ti_timeout; - break; - } + int ti_timeout = item->ti_timeout; + if (timeout > ti_timeout) + timeout = ti_timeout; + break; + } mutex_unlock(&pinger_mutex); return cfs_time_sub(cfs_time_add(time, cfs_time_seconds(timeout)),