From patchwork Mon Jul 9 14:48:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengguang Xu X-Patchwork-Id: 10514805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C05C6032C for ; Mon, 9 Jul 2018 14:49:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D90128C57 for ; Mon, 9 Jul 2018 14:49:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61E4A28C50; Mon, 9 Jul 2018 14:49:04 +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 0848E28C24 for ; Mon, 9 Jul 2018 14:49:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933070AbeGIOtB (ORCPT ); Mon, 9 Jul 2018 10:49:01 -0400 Received: from mout.gmx.net ([212.227.17.22]:49421 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932508AbeGIOtA (ORCPT ); Mon, 9 Jul 2018 10:49:00 -0400 Received: from x201.localdomain ([223.104.63.8]) by mail.gmx.com (mrgmx103 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LpKY5-1gH4kK2tJl-00fEmq; Mon, 09 Jul 2018 16:48:54 +0200 From: Chengguang Xu To: ceph-devel@vger.kernel.org Cc: zyan@redhat.com, idryomov@gmail.com, Chengguang Xu Subject: [PATCH] ceph: replace variable ret using err for error case in ceph_pre_init_acls() Date: Mon, 9 Jul 2018 22:48:07 +0800 Message-Id: <20180709144807.23632-1-cgxu519@gmx.com> X-Mailer: git-send-email 2.17.1 X-Provags-ID: V03:K1:CAtY0ILzm2L6Y5QHG7nzXXBfOZnd2gMIpAHnDqb0YLGY2G6Th3j qckX1xEYd8bKt4NooEg/r+g/2+aG/hKMTEj0oZc0saO4d3ESdZeFSio0CDhzL34pdE/J89+ FIaBdiREO4hjnVyzWXI2pEWDtxOksd2pyrOE3X35VKYg1NVxZ2hx9NyHyRYkDQ9/Nach45A TiUIw9H/NwbxKiq3AwDJA== X-UI-Out-Filterresults: notjunk:1; V01:K0:m5sPv057oRo=:JYIAfSlNBSXragDO2f4tdO f9pnHH/p2/REPWc0M/9bA3LF8R41JeNYhEtMlbX/kXXD5Znb1zUn7Up2YSMo8qaqZ5xd/mWT2 +CeX8ry3CY5BuAcmMLmFCzXbJnvpCReKQbGbUxKY24lsRmgOWMcUS9Gm3nL9IJXZfbQ8N201Z YRVHzRyyAqvP5+xWxhdBdSPQvZT0zPsCAqn8DQJb5T9Xv2DbVK2+7Cugfqa3l7sQh6nkUTbmW LvG1qEf5RUzqVpnO6a/MXh5RZBqKlwhNk/LajPUNomnbKSpTWLkjRtK3RjCw3+yHWcpiZWyuJ 5cA3f+1j5yaC2b0NVgCL2Fh+olg+WjTdH3lmrXKgL583c7z/Dy/xEF6emz/j50h2aX6/qjQCR UbRuA+7C9T8ekzw9mvteMtEevEEjD5RF8kyVlEj/SRRORKM/jHwnVCa+lUoWOINfvcc+rdxQQ TrE1pUAVZH9NWbCx7z9WlAQD2WeEzC8T+445aVoOPd76/Pq2GhCsgN2njhq76x86O/E/WQCGz yysDVBPmardOZ6igwdGndiHCV+8sco5mBefu9fryPLBp/VdHY3UI//Z3kWioYSXglmiHKW5qO veTS277XPTql3jcuZlkBt+/g27DbuE/vEdx1sXiRY+zBLZ/0bZ0VmxGzhV7cB455DA8B3N6Ji So0Ifb04U/0vltQhQEbaVm8Rw2ZzWbCcLbFYw51oYfTUJ67ntDUnDV73ucKJFBH/y55Agi5cE G5sdjOPVQOt/GCUYNtbpobrNxVvJUrJwsd8g0DbzY7H3lxW5dmw3rU+YQBM= 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 In order to return correct error code should replace variable ret using err in error case. Signed-off-by: Chengguang Xu --- fs/ceph/acl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c index 3351ea14390b..027408d55aee 100644 --- a/fs/ceph/acl.c +++ b/fs/ceph/acl.c @@ -185,10 +185,10 @@ int ceph_pre_init_acls(struct inode *dir, umode_t *mode, return err; if (acl) { - int ret = posix_acl_equiv_mode(acl, mode); - if (ret < 0) + err = posix_acl_equiv_mode(acl, mode); + if (err < 0) goto out_err; - if (ret == 0) { + if (err == 0) { posix_acl_release(acl); acl = NULL; }