public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@linux.intel.com>
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] change io_cancel return code for no cancel case
Date: Wed, 7 Sep 2005 16:39:56 -0400	[thread overview]
Message-ID: <20050907203956.GA21330@linux.intel.com> (raw)

From: Wendy Cheng <wcheng@redhat.com>

Note that other than few exceptions, most of the current filesystem and/or
drivers do not have aio cancel specifically defined (kiob->ki_cancel field
is mostly NULL).  However, sys_io_cancel system call universally sets
return code to -EAGAIN.  This gives applications a wrong impression that
this call is implemented but just never works.  We have customer inquires
about this issue.

Changed by Benjamin LaHaise to EINVAL instead of ENOSYS

Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
Acked-by: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>

 aio.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -purN --exclude=description 00_linus-git/fs/aio.c 01_aio_enosys/fs/aio.c
--- 00_linus-git/fs/aio.c	2005-09-07 10:59:31.000000000 -0400
+++ 01_aio_enosys/fs/aio.c	2005-09-07 11:03:55.000000000 -0400
@@ -1673,7 +1673,7 @@ asmlinkage long sys_io_cancel(aio_contex
 				ret = -EFAULT;
 		}
 	} else
-		printk(KERN_DEBUG "iocb has no cancel operation\n");
+		ret = -EINVAL;
 
 	put_ioctx(ctx);
 

             reply	other threads:[~2005-09-07 20:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-07 20:39 Benjamin LaHaise [this message]
2005-09-07 20:41 ` [AIO] kiocb locking to serialise retry and cancel Benjamin LaHaise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050907203956.GA21330@linux.intel.com \
    --to=bcrl@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox