diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-05-17 01:11:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-17 08:23:04 -0400 |
commit | 8317f14b60c02c69cf7f594e2aabc8a3fdc9618d (patch) | |
tree | 6888b4a803316916c2e4be3ff6c6228d45066831 | |
parent | d55e2ca87321b65387d3c52dd38128b3fe6723b0 (diff) |
simplify compat_sys_timerfd
Just thought this is easier to read.
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/compat.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/compat.c b/fs/compat.c index 7b21b0a82596..1de2331db844 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -2230,21 +2230,16 @@ asmlinkage long compat_sys_signalfd(int ufd, | |||
2230 | asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags, | 2230 | asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags, |
2231 | const struct compat_itimerspec __user *utmr) | 2231 | const struct compat_itimerspec __user *utmr) |
2232 | { | 2232 | { |
2233 | long res; | ||
2234 | struct itimerspec t; | 2233 | struct itimerspec t; |
2235 | struct itimerspec __user *ut; | 2234 | struct itimerspec __user *ut; |
2236 | 2235 | ||
2237 | res = -EFAULT; | ||
2238 | if (get_compat_itimerspec(&t, utmr)) | 2236 | if (get_compat_itimerspec(&t, utmr)) |
2239 | goto err_exit; | 2237 | return -EFAULT; |
2240 | ut = compat_alloc_user_space(sizeof(*ut)); | 2238 | ut = compat_alloc_user_space(sizeof(*ut)); |
2241 | if (copy_to_user(ut, &t, sizeof(t)) ) | 2239 | if (copy_to_user(ut, &t, sizeof(t))) |
2242 | goto err_exit; | 2240 | return -EFAULT; |
2243 | 2241 | ||
2244 | res = sys_timerfd(ufd, clockid, flags, ut); | 2242 | return sys_timerfd(ufd, clockid, flags, ut); |
2245 | err_exit: | ||
2246 | return res; | ||
2247 | } | 2243 | } |
2248 | 2244 | ||
2249 | #endif /* CONFIG_TIMERFD */ | 2245 | #endif /* CONFIG_TIMERFD */ |
2250 | |||