Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755315Ab3DLP6t (ORCPT ); Fri, 12 Apr 2013 11:58:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44357 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752409Ab3DLP6s (ORCPT ); Fri, 12 Apr 2013 11:58:48 -0400 From: Jeff Moyer To: Kent Overstreet Cc: linux-kernel@vger.kernel.org, linux-aio@kvack.org, akpm@linux-foundation.org, Zach Brown , Felipe Balbi , Greg Kroah-Hartman , Mark Fasheh , Joel Becker , Rusty Russell , Jens Axboe , Asai Thambi S P , Selvan Mani , Sam Bradshaw , Al Viro , Benjamin LaHaise , "Theodore Ts'o" Subject: Re: [PATCH 07/33] aio: add kiocb_cancel() References: <1363883754-27966-1-git-send-email-koverstreet@google.com> <1363883754-27966-8-git-send-email-koverstreet@google.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Fri, 12 Apr 2013 11:58:24 -0400 In-Reply-To: <1363883754-27966-8-git-send-email-koverstreet@google.com> (Kent Overstreet's message of "Thu, 21 Mar 2013 09:35:28 -0700") Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1737 Lines: 47 Kent Overstreet writes: > Minor refactoring, to get rid of some duplicated code > > [akpm@linux-foundation.org: fix warning] > Signed-off-by: Kent Overstreet > Cc: Zach Brown > Cc: Felipe Balbi > Cc: Greg Kroah-Hartman > Cc: Mark Fasheh > Cc: Joel Becker > Cc: Rusty Russell > Cc: Jens Axboe > Cc: Asai Thambi S P > Cc: Selvan Mani > Cc: Sam Bradshaw > Cc: Jeff Moyer > Cc: Al Viro > Cc: Benjamin LaHaise > Cc: Theodore Ts'o > Signed-off-by: Andrew Morton The patch looks to preserve existing behaviour. However, the man page and the code disagree about the return code in the event that there is no cancelation routine (well, in the event that the iocb could not be canceled): ERRORS EAGAIN The iocb specified was not canceled. EFAULT One of the data structures points to invalid data. EINVAL The AIO context specified by ctx_id is invalid. ENOSYS io_cancel() is not implemented on this architecture. The code (before and after the patch) returns EINVAL when the iocb was not canceled. Should we fix the code or the docs, here? For the patch: Acked-by: Jeff Moyer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/