From patchwork Wed Feb 6 20:01:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 218483 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 6B5532C02C9 for ; Wed, 6 Feb 2013 14:58:47 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754870Ab3BFD6q (ORCPT ); Tue, 5 Feb 2013 22:58:46 -0500 Received: from mail-da0-f52.google.com ([209.85.210.52]:63854 "EHLO mail-da0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753785Ab3BFD6p (ORCPT ); Tue, 5 Feb 2013 22:58:45 -0500 Received: by mail-da0-f52.google.com with SMTP id f10so397051dak.11 for ; Tue, 05 Feb 2013 19:58:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:content-type:content-transfer-encoding; bh=/ZpQI5mIFm+VF/uCxZD6ToPxcHqLYz568q+/UXdvzFI=; b=XAGsCj5diYb+qgJ4nI9bgSWl/vOhTDyKNqePKR4O/4qfqhPioKIp2M6aRlnOBC4IHA ZzNU69M2SBwQ0xxb7iBQd12cqFx+8u/xtcKT1+uNU0keIoiu/4iTh/FpxSWnm5CuLAnQ urkfwQxFgCuqarMBUiWxOryUl3AUyK+aJyB8VQ8RRa3r/nBq/aSjuHIA4wNzpSZjb12n NCIlDcQ/qfBzQWsbqsiCJO+GyprB13GPE2bnvgSMoBfcW4T9jk+J3j/OnKzvRgXgtWfS m0elwnJCcEZGq0TAdR6nrIAEZLIULYHEDcnqvrE7JEf0gFrkyt+LQ5e0as2rBb3QDaFW hhyQ== X-Received: by 10.66.72.201 with SMTP id f9mr71258600pav.38.1360123125117; Tue, 05 Feb 2013 19:58:45 -0800 (PST) Received: from [192.168.94.131] ([112.4.51.43]) by mx.google.com with ESMTPS id w2sm28875931pax.22.2013.02.05.19.58.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Feb 2013 19:58:44 -0800 (PST) Message-ID: <5112B68D.3080108@gmail.com> Date: Wed, 06 Feb 2013 12:01:17 -0800 From: Wang Shilong User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Jan Kara CC: linux-ext4@vger.kernel.org Subject: [PATCH 1/3] Ext2: remove the overhead check about sb in the function ext2_new_blocks Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Wang Shilong It can be guranteed that inode->i_sb should not be null in vfs. So here the check about it is overhead. Signed-off-by: Wang Shilong --- fs/ext2/balloc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 1c36139..22993a0 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -1239,10 +1239,6 @@ ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal, *errp = -ENOSPC; sb = inode->i_sb; - if (!sb) { - printk("ext2_new_blocks: nonexistent device"); - return 0; - } /* * Check quota for allocation of this block.