summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/dht/src/dht-common.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index d1671dcd879..0a0ce52f3da 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -435,15 +435,14 @@ typedef enum {
} while (0)
#define DHT_UPDATE_TIME(ctx_sec, ctx_nsec, new_sec, new_nsec, inode, post) do {\
- int32_t sec = 0; \
- sec = new_sec; \
LOCK (&inode->lock); \
{ \
- new_sec = max(new_sec, ctx_sec); \
- if (sec < new_sec) \
- new_nsec = ctx_nsec; \
- if (sec == new_sec) \
+ if (ctx_sec == new_sec) \
new_nsec = max (new_nsec, ctx_nsec); \
+ else if (ctx_sec > new_sec) { \
+ new_sec = ctx_sec; \
+ new_nsec = ctx_nsec; \
+ } \
if (post) { \
ctx_sec = new_sec; \
ctx_nsec = new_nsec; \