From patchwork Thu Jan 13 12:45:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Xu X-Patchwork-Id: 78746 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 A67F0B70A3 for ; Thu, 13 Jan 2011 23:46:03 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756649Ab1AMMqA (ORCPT ); Thu, 13 Jan 2011 07:46:00 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]:43562 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756629Ab1AMMqA (ORCPT ); Thu, 13 Jan 2011 07:46:00 -0500 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p0DCjt3c016239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Jan 2011 12:45:57 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p0DCD4kb013224; Thu, 13 Jan 2011 12:45:54 GMT Received: from abhmt018.oracle.com by acsmt355.oracle.com with ESMTP id 956698161294922749; Thu, 13 Jan 2011 04:45:49 -0800 Received: from localhost.localdomain (/221.221.213.178) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 13 Jan 2011 04:45:48 -0800 From: Simon Xu To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Xu Subject: [PATCH] ext4: reduce redundant check of '*options' Date: Thu, 13 Jan 2011 20:45:32 +0800 Message-Id: <1294922732-2385-1-git-send-email-xu.simon@oracle.com> X-Mailer: git-send-email 1.7.3.5 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org We don't need to check whether '*options' equals to ',' twice. Signed-off-by: Simon Xu --- fs/ext4/super.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 29c80f6..5d8c173 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1350,13 +1350,13 @@ static ext4_fsblk_t get_sb_block(void **data) options += 3; /* TODO: use simple_strtoll with >32bit ext4 */ sb_block = simple_strtoul(options, &options, 0); - if (*options && *options != ',') { + if (*options == ',') { + options++; + else if (*options) { printk(KERN_ERR "EXT4-fs: Invalid sb specification: %s\n", (char *) *data); return 1; } - if (*options == ',') - options++; *data = (void *) options; return sb_block;