Skip to content

Commit

Permalink
simplify compat_sys_timerfd
Browse files Browse the repository at this point in the history
Just thought this is easier to read.

Acked-by: Davide Libenzi <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
heicarst authored and Linus Torvalds committed May 17, 2007
1 parent d55e2ca commit 8317f14
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 8317f14

Please sign in to comment.