diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1078,9 +1078,7 @@ static void timeout_func(unsigned long data) | |||
1078 | 1078 | ||
1079 | static inline void init_timeout(struct aio_timeout *to) | 1079 | static inline void init_timeout(struct aio_timeout *to) |
1080 | { | 1080 | { |
1081 | init_timer(&to->timer); | 1081 | setup_timer_on_stack(&to->timer, timeout_func, (unsigned long) to); |
1082 | to->timer.data = (unsigned long)to; | ||
1083 | to->timer.function = timeout_func; | ||
1084 | to->timed_out = 0; | 1082 | to->timed_out = 0; |
1085 | to->p = current; | 1083 | to->p = current; |
1086 | } | 1084 | } |
@@ -1213,6 +1211,7 @@ retry: | |||
1213 | if (timeout) | 1211 | if (timeout) |
1214 | clear_timeout(&to); | 1212 | clear_timeout(&to); |
1215 | out: | 1213 | out: |
1214 | destroy_timer_on_stack(&to.timer); | ||
1216 | return i ? i : ret; | 1215 | return i ? i : ret; |
1217 | } | 1216 | } |
1218 | 1217 | ||