projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NIU: Implement discard counters
[firefly-linux-kernel-4.4.55.git]
/
fs
/
timerfd.c
diff --git
a/fs/timerfd.c
b/fs/timerfd.c
index c502c60e4f54ddfe6ac9402c2c550a274485b003..0862f0e49d0cf8b5af985a2ea46991d25b6b9eaf 100644
(file)
--- a/
fs/timerfd.c
+++ b/
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)
{
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;
}
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->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);
ctx->tmr.function = timerfd_tmrproc;
if (texp.tv64 != 0)
hrtimer_start(&ctx->tmr, texp, htmode);