From patchwork Sun Feb 26 15:54:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 143096 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CB498B6FBE for ; Mon, 27 Feb 2012 02:50:13 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750899Ab2BZPtx (ORCPT ); Sun, 26 Feb 2012 10:49:53 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:51965 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818Ab2BZPtx (ORCPT ); Sun, 26 Feb 2012 10:49:53 -0500 Received: by iazz13 with SMTP id z13so2204288iaz.19 for ; Sun, 26 Feb 2012 07:49:52 -0800 (PST) Received-SPF: pass (google.com: domain of gnehzuil.liu@gmail.com designates 10.50.11.129 as permitted sender) client-ip=10.50.11.129; Authentication-Results: mr.google.com; spf=pass (google.com: domain of gnehzuil.liu@gmail.com designates 10.50.11.129 as permitted sender) smtp.mail=gnehzuil.liu@gmail.com; dkim=pass header.i=gnehzuil.liu@gmail.com Received: from mr.google.com ([10.50.11.129]) by 10.50.11.129 with SMTP id q1mr13283128igb.23.1330271392989 (num_hops = 1); Sun, 26 Feb 2012 07:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=WDIFD35cizAudWX2KM/tHdnVbolXSVmxUgjn4te9OII=; b=DUtolPCCcBXzwMhF4MnbVZi/42GgRaIpfgzoJP0P+38ntwtTo3VM/geiy7RkArqNTH wmyn5YVguw0QqSnhe8Mrxz2vh4cDMhvYTasJs6i5fTCs2/PSce2LpnSXGFo+Ws9gVmy0 bVVhDWpDty2SQXkByb5JTgUAbnsUzLecDLdC0= Received: by 10.50.11.129 with SMTP id q1mr10774787igb.23.1330271392933; Sun, 26 Feb 2012 07:49:52 -0800 (PST) Received: from localhost.localdomain ([182.92.247.2]) by mx.google.com with ESMTPS id ub10sm7783855igb.7.2012.02.26.07.49.49 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 26 Feb 2012 07:49:52 -0800 (PST) From: Zheng Liu To: linux-ext4@vger.kernel.org Cc: tytso@mit.edu, Zheng Liu Subject: [PATCH] ext4: cleanup in ext4_discard_allocated_blocks() Date: Sun, 26 Feb 2012 23:54:37 +0800 Message-Id: <1330271677-10200-1-git-send-email-wenqing.lz@taobao.com> X-Mailer: git-send-email 1.7.4.1 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org remove 'len' variable in ext4_discard_allocated_blocks() because it is useless. Signed-off-by: Zheng Liu --- fs/ext4/mballoc.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index cb990b2..8f8889f 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3123,12 +3123,9 @@ static void ext4_mb_collect_stats(struct ext4_allocation_context *ac) static void ext4_discard_allocated_blocks(struct ext4_allocation_context *ac) { struct ext4_prealloc_space *pa = ac->ac_pa; - int len; - if (pa && pa->pa_type == MB_INODE_PA) { - len = ac->ac_b_ex.fe_len; - pa->pa_free += len; - } + if (pa && pa->pa_type == MB_INODE_PA) + pa->pa_free += ac->ac_b_ex.fe_len; }