From patchwork Mon Jun 22 22:53:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 29018 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id DB171B711C for ; Tue, 23 Jun 2009 06:52:46 +1000 (EST) Received: by ozlabs.org (Postfix) id CDCACDDDA0; Tue, 23 Jun 2009 06:52:46 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 548CBDDD0B for ; Tue, 23 Jun 2009 06:52:46 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756528AbZFVUwc (ORCPT ); Mon, 22 Jun 2009 16:52:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757353AbZFVUwc (ORCPT ); Mon, 22 Jun 2009 16:52:32 -0400 Received: from mail-ew0-f210.google.com ([209.85.219.210]:35023 "EHLO mail-ew0-f210.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756528AbZFVUwa (ORCPT ); Mon, 22 Jun 2009 16:52:30 -0400 Received: by ewy6 with SMTP id 6so5028294ewy.37 for ; Mon, 22 Jun 2009 13:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=+o7kjZ15K/G2Kv7a5zPLSm1tQ/u9saYoP4bAiZUo+Ow=; b=kxNAgGBpP2NUESXmG66hgZMKtLtzx8TOLiLzL9IDtWB6DuBVb/503sTz3oWamIO5OE +HA+1yTj03lTxVFlb/ots3f6/5nPfgs3Yxp0bX1/qyjMLnvcXnMV6PWMZL8bFGEeI1q2 MnrXXC+FfMBSKK+PnshpIXJvgv05N8to83JRU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=cpJE+CeAiqrXKsr//E0TI7VE6p0bAVXBd2KeYv600mOJQylEUnvRuSTxFHr9aENL/6 xJVpRtznqzDnxTlIQ7mvFEWzXB0PAwKzUbrXxDEg3dUyiMhcif/Py/WKIF0E9PzFXYYu FfdocG4o6HIC53ylqY+F1STpelYOLvMXyS+CY= Received: by 10.211.168.4 with SMTP id v4mr7909482ebo.20.1245703952072; Mon, 22 Jun 2009 13:52:32 -0700 (PDT) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 23sm66206eya.29.2009.06.22.13.52.31 (version=SSLv3 cipher=RC4-MD5); Mon, 22 Jun 2009 13:52:31 -0700 (PDT) Message-ID: <4A400B53.2080903@gmail.com> Date: Tue, 23 Jun 2009 00:53:07 +0200 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: tytso@mit.edu CC: linux-ext4@vger.kernel.org, Andrew Morton Subject: [PATCH] ext4: remove redundant test on unsigned Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org unsigned i_block cannot be less than 0. Signed-off-by: Roel Kluin --- Maybe a test `if (i_block > MAX)' but what should MAX be? -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 7c17ae2..3cd567d 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -343,9 +343,7 @@ static int ext4_block_to_path(struct inode *inode, int n = 0; int final = 0; - if (i_block < 0) { - ext4_warning(inode->i_sb, "ext4_block_to_path", "block < 0"); - } else if (i_block < direct_blocks) { + if (i_block < direct_blocks) { offsets[n++] = i_block; final = direct_blocks; } else if ((i_block -= direct_blocks) < indirect_blocks) {