Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4529669imb; Wed, 6 Mar 2019 16:04:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwaagu6MGFhl2yJvGCua+sOnCwHS5v4RzrKsIT9KgQ1SVGHsT6f5MNq5eDhE0hhKPDZ1pE4 X-Received: by 2002:a63:516:: with SMTP id 22mr8421426pgf.353.1551917082107; Wed, 06 Mar 2019 16:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551917082; cv=none; d=google.com; s=arc-20160816; b=CX/RVMpFVHqDa74sgtsf6+y6HNGRu+Gb8AfZUyVeaxc9K7ARXl/+UK+Jzskj0ccLLp 7O/ovqaPpimGjL47vsUL395bZiSQlrQTHKmrExSJxP3FCjCDx3B/0axJn/oi9423TXLW qGfrlZg7mPH837mXmaj5QLUvnBjm8HKGdu5gwInHr2R9DIUu5Y0o3xRxIZXE73JkPKLd GUb67V4Jsb4FO1HgmLgPAIxX2IFEaD+C00Dp090m65zae/xNEpUtI9wq1LDd5PCk+wXK Bc9kGtqQ6y4ogzT/3JNcUB2d3GkNmaGUvDVJr9nPjPeZN86ibGsGoc0wj24m0QyN9c4M mN2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FKCTQxSWMcCPTtQnAIVKQX6CAfZ/3+5Ym16KolY1kEA=; b=dnbG1R/ewqF2LyYvw1b77TgPiGY0q5F0JQbwFRS4vvIloFb9KEEcyyGgwAm34bYkNw +wnQR4f03qrsey/DZRj35ZP2+IGV4Oexd1Om6blIGo4K6AZnPBwuEvSArPdWU7oUWE/N HF7j6fKdLSDIg8JGHGB7fP3BB3rIYTdD8rVVeDSsNTDlAzGEDiTtmBn61yMZPbtpVZEi tPaiYq78rkDrCRCIiaGcegv3FGQcdAys3SIVKFGAmoLRkTC94LsLMBAj3+x5u3BWBPVR gKPyllWDmT8uSOYq7yf1jC0nG9ECVCfjERv/Je9L0V47/0i1KD5fDZ7pppWpR9SZ3Dcj +3TQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si2632112pll.389.2019.03.06.16.04.27; Wed, 06 Mar 2019 16:04:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726800AbfCGAEF (ORCPT + 99 others); Wed, 6 Mar 2019 19:04:05 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:39976 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbfCGADa (ORCPT ); Wed, 6 Mar 2019 19:03:30 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1h1gVJ-000870-Ey; Thu, 07 Mar 2019 00:03:17 +0000 From: Al Viro To: Linus Torvalds Cc: Eric Dumazet , David Miller , Jason Baron , kgraul@linux.ibm.com, ktkhai@virtuozzo.com, kyeongdon.kim@lge.com, Linux List Kernel Mailing , Netdev , pabeni@redhat.com, syzkaller-bugs@googlegroups.com, xiyou.wangcong@gmail.com, Christoph Hellwig , zhengbin , bcrl@kvack.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, houtao1@huawei.com, yi.zhang@huawei.com Subject: [PATCH 5/8] make aio_read()/aio_write() return int Date: Thu, 7 Mar 2019 00:03:13 +0000 Message-Id: <20190307000316.31133-5-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190307000316.31133-1-viro@ZenIV.linux.org.uk> References: <20190307000316.31133-1-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro that ssize_t is a rudiment of earlier calling conventions; it's been used only to pass 0 and -E... since last autumn. Signed-off-by: Al Viro --- fs/aio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index ee062253e303..5dd5f35d054c 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1508,13 +1508,13 @@ static inline void aio_rw_done(struct kiocb *req, ssize_t ret) } } -static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, +static int aio_read(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) { struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs; struct iov_iter iter; struct file *file; - ssize_t ret; + int ret; ret = aio_prep_rw(req, iocb); if (ret) @@ -1536,13 +1536,13 @@ static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb, return ret; } -static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, +static int aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) { struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs; struct iov_iter iter; struct file *file; - ssize_t ret; + int ret; ret = aio_prep_rw(req, iocb); if (ret) @@ -1716,7 +1716,7 @@ aio_poll_queue_proc(struct file *file, struct wait_queue_head *head, add_wait_queue(head, &pt->iocb->poll.wait); } -static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) +static int aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb) { struct kioctx *ctx = aiocb->ki_ctx; struct poll_iocb *req = &aiocb->poll; @@ -1787,7 +1787,7 @@ static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, { struct aio_kiocb *req; struct file *file; - ssize_t ret; + int ret; /* enforce forwards compatibility on users */ if (unlikely(iocb->aio_reserved2)) { -- 2.11.0