]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/aio.c
[PATCH] change io_cancel return code for no cancel case
[mv-sheeva.git] / fs / aio.c
index 06d7d4390fe7dd8562e8433ce3a29b2b9ee4e241..769791df36b4f357bdcbbd2fa891cb23d6f477cd 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -567,6 +567,10 @@ 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
+        */
        activate_mm(active_mm, mm);
        task_unlock(tsk);
 
@@ -1669,7 +1673,7 @@ asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb,
                                ret = -EFAULT;
                }
        } else
-               printk(KERN_DEBUG "iocb has no cancel operation\n");
+               ret = -EINVAL;
 
        put_ioctx(ctx);