From c8344f0dbb40c08104a25c2e8dcd3e0516829339 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 1 Sep 2008 15:00:14 -0700 Subject: [PATCH] --- yaml --- r: 117599 b: refs/heads/master c: 76369470b7e5f97fc1a8af83c45b9ff739b08cb6 h: refs/heads/master i: 117597: 98f8c3b0d61864727fda2f0a391637f2983ed7b9 117595: b7d11f01e0582fe5e6dbf89cbdafe918c84e157a 117591: 91e3efb4cf90d2b803cbd35dd676a5c1c159e6b0 117583: 89fe1065e6051c42835f4ad5411f6e7c0ce2a34b 117567: 309c637e95e404b2abb779ea9daad4b1817b3b29 v: v3 --- [refs] | 2 +- trunk/fs/timerfd.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 9a013a5bf4e0..23024384ae7f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: beb20d52d03a51218827fb4a36a4b583debb03f9 +refs/heads/master: 76369470b7e5f97fc1a8af83c45b9ff739b08cb6 diff --git a/trunk/fs/timerfd.c b/trunk/fs/timerfd.c index c502c60e4f54..0862f0e49d0c 100644 --- a/trunk/fs/timerfd.c +++ b/trunk/fs/timerfd.c @@ -52,11 +52,9 @@ static enum hrtimer_restart timerfd_tmrproc(struct hrtimer *htmr) static ktime_t timerfd_get_remaining(struct timerfd_ctx *ctx) { - ktime_t now, remaining; - - now = ctx->tmr.base->get_time(); - remaining = ktime_sub(ctx->tmr.expires, now); + ktime_t remaining; + remaining = hrtimer_expires_remaining(&ctx->tmr); return remaining.tv64 < 0 ? ktime_set(0, 0): remaining; } @@ -74,7 +72,7 @@ static void timerfd_setup(struct timerfd_ctx *ctx, int flags, ctx->ticks = 0; ctx->tintv = timespec_to_ktime(ktmr->it_interval); hrtimer_init(&ctx->tmr, ctx->clockid, htmode); - ctx->tmr.expires = texp; + hrtimer_set_expires(&ctx->tmr, texp); ctx->tmr.function = timerfd_tmrproc; if (texp.tv64 != 0) hrtimer_start(&ctx->tmr, texp, htmode);