From patchwork Thu Oct 11 13:25:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Behrens X-Patchwork-Id: 1582131 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 5AC1B3FD9C for ; Thu, 11 Oct 2012 13:55:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756648Ab2JKNzl (ORCPT ); Thu, 11 Oct 2012 09:55:41 -0400 Received: from xp-ob.rzone.de ([81.169.146.136]:14367 "EHLO xp-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751956Ab2JKNzk (ORCPT ); Thu, 11 Oct 2012 09:55:40 -0400 X-Greylist: delayed 1821 seconds by postgrey-1.27 at vger.kernel.org; Thu, 11 Oct 2012 09:55:40 EDT X-RZG-CLASS-ID: xp Received: from pizpot.store ([192.168.43.236]) by jored.store (jored xp3) (RZmta 30.20 OK) with ESMTP id p073b4o9BCPpL6 for ; Thu, 11 Oct 2012 15:25:16 +0200 (CEST) From: Stefan Behrens To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: Fix wrong error handling code Date: Thu, 11 Oct 2012 15:25:16 +0200 Message-Id: <1349961916-19655-1-git-send-email-sbehrens@giantdisaster.de> X-Mailer: git-send-email 1.7.12.3 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org gcc says "warning: comparison of unsigned expression >= 0 is always true" because i is an unsigned long. And gcc is right this time. Signed-off-by: Stefan Behrens --- fs/btrfs/extent_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 64dc93f..a32ebfe 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -4104,8 +4104,8 @@ struct extent_buffer *alloc_dummy_extent_buffer(u64 start, unsigned long len) return eb; err: - for (i--; i >= 0; i--) - __free_page(eb->pages[i]); + for (; i > 0; i--) + __free_page(eb->pages[i - 1]); __free_extent_buffer(eb); return NULL; }