Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2619976imm; Sun, 5 Aug 2018 08:15:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdFyv1e1RDIOMrw1roi8Dr+Md8WwZiruVwLnwp99EvNn/RHVrYCfHjocqafsPw0/EqcJCxR X-Received: by 2002:a17:902:7587:: with SMTP id j7-v6mr10700806pll.256.1533482138436; Sun, 05 Aug 2018 08:15:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533482138; cv=none; d=google.com; s=arc-20160816; b=N07Q/DMg+rBE5FbvqR/yVsqCMoQHahQm2tnsSOvgLVNm245xtJweN6HWiEZNP8Tdiq yp9RAZ68j924U1M7podtSRLFeeZ804sSHEvhXkX2DMAI4G/syz9rt9t9zfpJVrNSmQuh JY3bsJnDF1LI3r0QBBCRnhGGa+DWNsuz4AD3eIRFo2GHqd+1HrSDKal1dqksZHrGJ4dI do/6aTWx97uYRPW4RiJKj5UrHZujOhOFtMt0GKpXAz7N8G+af9Xtp425v41wIAz+9v3P olQMC5r01dJRLggLsi8AITx7OLqosfWOjYXgVUnVBIb1YLIVqla1O47Q+RslI+yqZSxy VBeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=l1U1WNhsdXqU0Dgehcn7S7rL9pZBqqYXzBQIJFLqH+I=; b=zQmcC3vETD64varC9HLC4Ekd0o/HJ6+fLVRvmudS1i8W387ORTJ1EbfEV2NwBMr2Fg MURaBRM0QBVyG+qC32e9mSygXzrxHDCvAH2m19dG9BKx19i4AJFozGE6oVJ2jb+C+XC0 Oz3bAk7ieRhH2CCxsOKTBWum5wdKmrlCiCZaTt9J5/I8z5yMr9ZoSBoajbRBZ4cjqD4Y YIa7FL6jCh0692QbOkxJL6zQnr5dJqR/E7f148b0pEVVdfCdwklwG9MmtF9/XF3LjDZY 3UwoirJBbeh8dIE5TS8+9+sg8uirHNxJw+jfOdZvCcKi6zaYdQs9qgOL1bMWEGMffoAU REXA== 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 z63-v6si11096211pfi.214.2018.08.05.08.15.23; Sun, 05 Aug 2018 08:15:38 -0700 (PDT) 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 S1726855AbeHERTc (ORCPT + 99 others); Sun, 5 Aug 2018 13:19:32 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:47150 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726207AbeHERTb (ORCPT ); Sun, 5 Aug 2018 13:19:31 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id F3D6DCF00FFBF; Sun, 5 Aug 2018 23:14:32 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.399.0; Sun, 5 Aug 2018 23:14:31 +0800 From: zhong jiang To: , , CC: , Subject: [PATCH 2/3] fs/btrfs/extent-tree: remove redudant variable "err" Date: Sun, 5 Aug 2018 23:02:50 +0800 Message-ID: <1533481371-21349-3-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1533481371-21349-1-git-send-email-zhongjiang@huawei.com> References: <1533481371-21349-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The err is not used after initalization, So just remove it. And make the function to be void function. Signed-off-by: zhong jiang --- fs/btrfs/extent-tree.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index b1f2f64..ed02305 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6464,11 +6464,10 @@ static int btrfs_add_reserved_bytes(struct btrfs_block_group_cache *cache, * reserve set to 0 in order to clear the reservation. */ -static int btrfs_free_reserved_bytes(struct btrfs_block_group_cache *cache, - u64 num_bytes, int delalloc) +static void btrfs_free_reserved_bytes(struct btrfs_block_group_cache *cache, + u64 num_bytes, int delalloc) { struct btrfs_space_info *space_info = cache->space_info; - int ret = 0; spin_lock(&space_info->lock); spin_lock(&cache->lock); @@ -6481,7 +6480,6 @@ static int btrfs_free_reserved_bytes(struct btrfs_block_group_cache *cache, cache->delalloc_bytes -= num_bytes; spin_unlock(&cache->lock); spin_unlock(&space_info->lock); - return ret; } void btrfs_prepare_extent_commit(struct btrfs_fs_info *fs_info) { -- 1.7.12.4