Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp116755imc; Sat, 9 Mar 2019 23:12:09 -0800 (PST) X-Google-Smtp-Source: APXvYqzFid4lAFnwEwwv/0Ee+ArCf3uxMU2pptsIG83BZJeOWQ3GVjtUVyygKL9Sq2qjgMfQ/Scx X-Received: by 2002:a63:f74c:: with SMTP id f12mr24796822pgk.195.1552201929496; Sat, 09 Mar 2019 23:12:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552201929; cv=none; d=google.com; s=arc-20160816; b=l+byhNmVFZQuKAW60GYjCvn+muuSzHzzamrf8XDHjgLp6RG2ibBygs/bfhoQJAKHCI +urB2ZEVaonVYWAsSNG4PStG7RgeEs1UbcyjE24GPRVTaU2gTvkDn98opoxldlcQUwnv 3MwmcHigeM8kt5J0ASWydlaIDh1cglOftJtEO1/xvOxEwD84wpHSLqMPgWQ9s1sZWgr4 Pngw2FCXVfv3WA11l26/NDM1rOJywEpnzvEL8F4NM9OBbknmye1vkVGTUS4F9veaylup LOES9z9Rl7H3zwGIwEMhACHh4rZp+VtbVwMSQdYNr6AWTnkpaTW1uSx95dK3pis+LCTc lnbQ== 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=idaS7ASFCTUcLpG91sCKwISOQyBqbJUEF0bzBJjRtHI=; b=nSWDWxRrV/kZialOLBXjPSEmZKey9pVyed0g6jubHSDQ0g2T5lXvduEbH3JJabPQvH vKmdzPbALv26r+GMumRa7+R5plhAzViRYFeGaBZJS0+vWyPUQ5PmEkvr96Y/X5k0ezy1 cQTOPHqojyc9kVlZfgFzuW4HLMXbSyjjgpp1UEHrv428gTuCs0F5Zdi76Zv/WtwMUhjP y1nCJRI0DFJxEPUsb4aMZAUMSiGVTRDqaQ1pZd0SPN/qw1uDkKjkC+Lm8LPa7lx6lvBp ydssIrg5OzK6YSAQO9X0Bm/DAe6tnyxcMLl1Tzsd5oU8iZrgAOxM9YyvtDW0XOZ/D/Ez Hq/g== 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 34si2192389pgs.553.2019.03.09.23.11.54; Sat, 09 Mar 2019 23:12:09 -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 S1726551AbfCJHLL (ORCPT + 99 others); Sun, 10 Mar 2019 03:11:11 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:35478 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbfCJHLL (ORCPT ); Sun, 10 Mar 2019 03:11:11 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1h2sb7-00039G-1i; Sun, 10 Mar 2019 07:10:19 +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: Sun, 10 Mar 2019 07:08:19 +0000 Message-Id: <20190310070822.11564-5-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190310070822.11564-1-viro@ZenIV.linux.org.uk> References: <20190310070606.GA10138@ZenIV.linux.org.uk> <20190310070822.11564-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 f47a29f7f201..f9e8f1edfe36 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1513,13 +1513,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) @@ -1541,13 +1541,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) @@ -1713,7 +1713,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; @@ -1778,7 +1778,7 @@ static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb __user *user_iocb, bool compat) { struct aio_kiocb *req; - ssize_t ret; + int ret; /* enforce forwards compatibility on users */ if (unlikely(iocb->aio_reserved2)) { -- 2.11.0