From patchwork Sat Jul 28 08:30:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengguang Xu X-Patchwork-Id: 10547913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE70514BC for ; Sat, 28 Jul 2018 08:31:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C046A2BE3D for ; Sat, 28 Jul 2018 08:31:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4C092BE5C; Sat, 28 Jul 2018 08:31:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FE902BE3D for ; Sat, 28 Jul 2018 08:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726378AbeG1J4r (ORCPT ); Sat, 28 Jul 2018 05:56:47 -0400 Received: from mout.gmx.net ([212.227.17.20]:57961 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726195AbeG1J4r (ORCPT ); Sat, 28 Jul 2018 05:56:47 -0400 Received: from localhost.localdomain ([113.87.89.132]) by mail.gmx.com (mrgmx102 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MUCTO-1fb7Pq101i-00R3hL; Sat, 28 Jul 2018 10:31:00 +0200 From: Chengguang Xu To: ceph-devel@vger.kernel.org Cc: zyan@redhat.com, idryomov@gmail.com, Chengguang Xu Subject: [PATCH] ceph: chagne to void return type for __do_request() Date: Sat, 28 Jul 2018 16:30:48 +0800 Message-Id: <20180728083048.21475-1-cgxu519@gmx.com> X-Mailer: git-send-email 2.17.1 X-Provags-ID: V03:K1:xFiKFMpKt6bTUgkKc046T4lF3Mbs8kzRhLgmsrff8FR70MKdtFq Pf05dS2htWq3KkPQLu1qfKWgwEnZcIuKcplNGgyiBxTzltoVCwfJ1gEFLqbJeYGINhUm85w 42dFxZ0kDaP+HK8tDUyQeavGPqJM4ZyTqnhOP5okAqM6c995OP1Pg/hrn0rU3N3oNNpzHZb zd7Q1d0916O3kjDa+sPPg== X-UI-Out-Filterresults: notjunk:1;V01:K0:3Nru8MaiKbM=:vKF2QepiogIg5BuTADOFjK Zr6Tqtb2V8FqCfMOlUx7eXxlq//UgfTxxsWSw09epnn9Ho6r8LM4NK0+fMIxLxzoiaVCyleiT IxmQMuWG3etemZsLOZ9Ytb0Fhn4nptC4ZfbtqWV0KmRVFP66OJwwBYnxUYizuCvle+QDaDrYl fCkKYRes2HQV3ctTRK5Gaxe96h3ykLHs7QhBPM+jxvFxtTwR5yGuFtmNxrvOgIh+rEBUYG0a4 Qfwqa8q59QWBOAKjxfM2P/x0cAOXof6K1F7ptsbyYHd3Wv9ZZEeeEvZJDlecaMCWOOmxhV98v P/j16u5OK4RlaiHlwjYrVpzcvatlTHNa4a/jBXDg+44Ar9ZY2uATkNesaxe5SnBfCyZ4+CudU 35qSj+vY3d5bTi9i8QjEGg9nJ8j6LSQhRx7iMtWiddqV0NurlpZeFMfwsPugJKpulSnuUfyCX JgSAMz2Cgt65K+uus5aH13yMihJDutyM8wRZJjNZWNyqtzXPsNxDGjFCzkXzvKJguvqsVmxWB U6vdGx6D+01dpVI+O1+e1c6XkoPC/CaMaQW73o1BrzCpmIvsaJDZX2D886bNhhVsFGa6qk3kD 1BK+FKNtKk77BNlCu6/dIY/ZpwqwkCKxS56pOqkx6l2UINDThgL81F3mdIHdyZIQ5p1vvlb8w yfU58GJNVfcpSkvbPNYrgIMbf0PgzGlY5mVE77Nz+tcRwTqNiimOnTLxU3sFVwjlzTpUdl1mn NpvJY02yg689xPBXqlrf1/h+9PVd7PdNwHZ9WmmUKGOY728n/AYzWX4y5VA= Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We do not check return code for __do_request() in all callers, so change to void return type. Signed-off-by: Chengguang Xu --- fs/ceph/mds_client.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index d01a262ba691..c65192102381 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -2255,7 +2255,7 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc, /* * send request, or put it on the appropriate wait list. */ -static int __do_request(struct ceph_mds_client *mdsc, +static void __do_request(struct ceph_mds_client *mdsc, struct ceph_mds_request *req) { struct ceph_mds_session *session = NULL; @@ -2265,7 +2265,7 @@ static int __do_request(struct ceph_mds_client *mdsc, if (req->r_err || test_bit(CEPH_MDS_R_GOT_RESULT, &req->r_req_flags)) { if (test_bit(CEPH_MDS_R_ABORTED, &req->r_req_flags)) __unregister_request(mdsc, req); - goto out; + return; } if (req->r_timeout && @@ -2288,7 +2288,7 @@ static int __do_request(struct ceph_mds_client *mdsc, if (mdsc->mdsmap->m_epoch == 0) { dout("do_request no mdsmap, waiting for map\n"); list_add(&req->r_wait, &mdsc->waiting_for_map); - goto finish; + return; } if (!(mdsc->fsc->mount_options->flags & CEPH_MOUNT_OPT_MOUNTWAIT) && @@ -2306,7 +2306,7 @@ static int __do_request(struct ceph_mds_client *mdsc, ceph_mdsmap_get_state(mdsc->mdsmap, mds) < CEPH_MDS_STATE_ACTIVE) { dout("do_request no mds or not active, waiting for map\n"); list_add(&req->r_wait, &mdsc->waiting_for_map); - goto out; + return; } /* get, open session */ @@ -2356,8 +2356,7 @@ static int __do_request(struct ceph_mds_client *mdsc, complete_request(mdsc, req); __unregister_request(mdsc, req); } -out: - return err; + return; } /*