From patchwork Sun Oct 30 11:30:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongqiang Yang X-Patchwork-Id: 122606 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 4C8CEB6F83 for ; Mon, 31 Oct 2011 00:34:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755516Ab1J3Neq (ORCPT ); Sun, 30 Oct 2011 09:34:46 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:47841 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755414Ab1J3Neq (ORCPT ); Sun, 30 Oct 2011 09:34:46 -0400 Received: by iaby12 with SMTP id y12so6105160iab.19 for ; Sun, 30 Oct 2011 06:34:45 -0700 (PDT) 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=oNv7Di7aYL+HWBp7Ks9FZ0i4FwaV2dyqlnSF7g1Xl7o=; b=RweId0/QA0wvZsAGclFAa2m1Qqt7C4DordovipICxfDZl2rdhvBNWfs8rL6WH+ingR 3eRMax+Gd1vrObmcrZsWkNrfvrqhW29281wZ24XzzzUCYqaJJfJc7JLR6w3vPq1rE49y MbkAaT9rbNvieH1OUcGyYpW+FdScXRqEDu1EU= Received: by 10.231.64.78 with SMTP id d14mr3630424ibi.56.1319981685750; Sun, 30 Oct 2011 06:34:45 -0700 (PDT) Received: from localhost.localdomain ([159.226.43.42]) by mx.google.com with ESMTPS id g16sm21841601ibs.8.2011.10.30.06.34.41 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 30 Oct 2011 06:34:43 -0700 (PDT) From: Yongqiang Yang To: tytso@mit.edu Cc: linux-ext4@vger.kernel.org, Yongqiang Yang Subject: [PATCH 1/3] ext4: move variables to its scope Date: Sun, 30 Oct 2011 19:30:01 +0800 Message-Id: <1319974203-2625-1-git-send-email-xiaoqiangnk@gmail.com> X-Mailer: git-send-email 1.7.5.1 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Signed-off-by: Yongqiang Yang --- fs/ext4/inode.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e4b26fa..3c4a9d5 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3182,7 +3182,6 @@ int ext4_discard_partial_page_buffers_no_lock(handle_t *handle, ext4_fsblk_t index = from >> PAGE_CACHE_SHIFT; unsigned int offset = from & (PAGE_CACHE_SIZE-1); unsigned int blocksize, max, pos; - unsigned int end_of_block, range_to_discard; ext4_lblk_t iblock; struct buffer_head *bh; int err = 0; @@ -3234,6 +3233,8 @@ int ext4_discard_partial_page_buffers_no_lock(handle_t *handle, pos = offset; while (pos < offset + length) { + unsigned int end_of_block, range_to_discard; + err = 0; /* The length of space left to zero and unmap */