X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Faio.c;h=0fb3117ddd93d8a517720a744cd415a4b914f63c;hb=3a533374283aea50eab3976d8a6d30532175f009;hp=99c2352906a021cf42e6673faf71a9519bea05d4;hpb=1f43c5393033de90bac4410352b1d2a69dcbe7ef;p=linux-2.6 diff --git a/fs/aio.c b/fs/aio.c index 99c2352906..0fb3117ddd 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -591,10 +591,6 @@ static void use_mm(struct mm_struct *mm) atomic_inc(&mm->mm_count); tsk->mm = mm; tsk->active_mm = mm; - /* - * Note that on UML this *requires* PF_BORROWED_MM to be set, otherwise - * it won't work. Update it accordingly if you change it here - */ switch_mm(active_mm, mm, tsk); task_unlock(tsk); @@ -1078,9 +1074,7 @@ static void timeout_func(unsigned long data) static inline void init_timeout(struct aio_timeout *to) { - init_timer(&to->timer); - to->timer.data = (unsigned long)to; - to->timer.function = timeout_func; + setup_timer_on_stack(&to->timer, timeout_func, (unsigned long) to); to->timed_out = 0; to->p = current; } @@ -1213,6 +1207,7 @@ retry: if (timeout) clear_timeout(&to); out: + destroy_timer_on_stack(&to.timer); return i ? i : ret; }