From patchwork Fri Aug 17 14:05:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengguang Xu X-Patchwork-Id: 10568813 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 5754A14BD for ; Fri, 17 Aug 2018 14:05:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45B3E2B23A for ; Fri, 17 Aug 2018 14:05:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 375842BADD; Fri, 17 Aug 2018 14:05:57 +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 D1D082B23A for ; Fri, 17 Aug 2018 14:05:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726544AbeHQRJY (ORCPT ); Fri, 17 Aug 2018 13:09:24 -0400 Received: from mout.gmx.net ([212.227.15.15]:55011 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726356AbeHQRJY (ORCPT ); Fri, 17 Aug 2018 13:09:24 -0400 Received: from localhost.localdomain ([113.116.157.152]) by mail.gmx.com (mrgmx003 [212.227.17.184]) with ESMTPSA (Nemesis) id 0M0xbD-1g8t7b15BP-00v9n2; Fri, 17 Aug 2018 16:05:49 +0200 From: Chengguang Xu To: ceph-devel@vger.kernel.org Cc: zyan@redhat.com, idryomov@gmail.com, Chengguang Xu Subject: [PATCH] ceph: remove unnecessary assignment Date: Fri, 17 Aug 2018 22:05:31 +0800 Message-Id: <20180817140531.32389-1-cgxu519@gmx.com> X-Mailer: git-send-email 2.17.1 X-Provags-ID: V03:K1:UtBQAv6gLIBvB2a8FLZA2JuwBKzGv5Z+/6stMkXtX/hptYneolf ZHlKcM/l6EZj3+EaDWKmqB5kd78MfsdGeOD0Q+prxfXjQNcBW1KHsNckbBTF8co4eXB6ugy JrvudFeExEh3bq5+ERv2fZsCTV4WN8Gk3Vw9DKP1A+mtRMh2RHprz7+sDuAy6Ez2BM/SDzk W/8vgZ+9ds2H2uZwH8wVQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:yF/UrNtrW/o=:apPg6telSMA+bT9BJbEXE+ N/A+Yh7bXYbShsEJuOpHyPXZW5GHrSiZUDVnv6RMRs3arQlY0ofkG8Kcd4NhIODJjagQUTSfD rsW1o5zQ/poAD7M9iCLdIETrE4aWXIbUE7wTYzNURGHO9+bdQJV9o+uatUPFGEuMy1sIRH6rW hWgB/nEs9hGKUv2Ir/XoYCh4Y36yMJBcFREz+uStn4NWewFnlH5wmxw4CMbQaCAEQtMU1eOTa YzaWcq6ovEuydcK/kDn3GYLN8mx4y+0E9NLRR03OP/4LNGapwrOqD4ZQrKHtlQ6P2k6L0bCSc Vqdjs8JHC1wzr6ufjqiTUxF4G7DW3raMK7fFTiJm8xVKwrSQpK7xbFHYX8sROv33NoM3pWuQZ g3U/7k8Jk6wvW1HZDY/+GLbWThd/vsv2zCuPwufJ0M5I376j3ZUm1jJvIoPWrUF0SpywoSpoU sOnEKSDY2rkwbUD3v2TtR03+EJBV8qfFF6vz/xoHBum35xrK+sM1GOSxBLwAef4M9wqJJuRln 6yxj3QAnhy/xrv2sQDRADkCwwDqiEIf9fYxJNUDu1atQKGHnbh0OhkF1m+GYsvmLG4HRRhRnY eOReRX6to8vfA2VBWXepbuu9fJoo3qTWPYQRaeV2Uv5Rd0TvMGjezd3EiWSYQMbpEieYAkrOS SrVZJ2pcXVddBQi1dSOgk+Z+Xp1Ai0/GEggalVe7Y9+IBVFS70FqGk86epFnXh863V849T4BS vvG1tsRzjfO/muImdx2qR6UdI8+sHHLgcuPUhXR+vpDp4hKI2JdVXhyO0Mg= 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 ceph_pagelist_encode_string() will not fail in reserved case, also, we do not check err code here, so remove unnecessary assignment. Signed-off-by: Chengguang Xu --- fs/ceph/acl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c index 027408d55aee..6fe4d2f1e4b2 100644 --- a/fs/ceph/acl.c +++ b/fs/ceph/acl.c @@ -236,8 +236,8 @@ int ceph_pre_init_acls(struct inode *dir, umode_t *mode, err = ceph_pagelist_reserve(pagelist, len + val_size2 + 8); if (err) goto out_err; - err = ceph_pagelist_encode_string(pagelist, - XATTR_NAME_POSIX_ACL_DEFAULT, len); + ceph_pagelist_encode_string(pagelist, + XATTR_NAME_POSIX_ACL_DEFAULT, len); err = posix_acl_to_xattr(&init_user_ns, default_acl, tmp_buf, val_size2); if (err < 0)