mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
timerfd: Setup @ticks only if nonzero
If @ticks is zero the kernel returns error because on creation the @ticks is already zero, so simply setup @ticks if real value present. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
725dfccfa6
commit
c948c8bc3a
@ -568,7 +568,8 @@ static int timerfd_arm(struct task_restore_args *args)
|
||||
}
|
||||
|
||||
ret = sys_timerfd_settime(t->fd, t->settime_flags, &t->val, NULL);
|
||||
ret |= sys_ioctl(t->fd, TFD_IOC_SET_TICKS, (unsigned long)&t->ticks);
|
||||
if (t->ticks)
|
||||
ret |= sys_ioctl(t->fd, TFD_IOC_SET_TICKS, (unsigned long)&t->ticks);
|
||||
if (ret) {
|
||||
pr_err("Can't restore ticks/time for timerfd - %d\n", i);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user