提交 8317f14b 编写于 作者: H Heiko Carstens 提交者: Linus Torvalds

simplify compat_sys_timerfd

Just thought this is easier to read.
Acked-by: NDavide Libenzi <davidel@xmailserver.org>
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d55e2ca8
......@@ -2230,21 +2230,16 @@ asmlinkage long compat_sys_signalfd(int ufd,
asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags,
const struct compat_itimerspec __user *utmr)
{
long res;
struct itimerspec t;
struct itimerspec __user *ut;
res = -EFAULT;
if (get_compat_itimerspec(&t, utmr))
goto err_exit;
return -EFAULT;
ut = compat_alloc_user_space(sizeof(*ut));
if (copy_to_user(ut, &t, sizeof(t)) )
goto err_exit;
if (copy_to_user(ut, &t, sizeof(t)))
return -EFAULT;
res = sys_timerfd(ufd, clockid, flags, ut);
err_exit:
return res;
return sys_timerfd(ufd, clockid, flags, ut);
}
#endif /* CONFIG_TIMERFD */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册