From patchwork Mon Sep 28 14:18:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaowei Bai X-Patchwork-Id: 7277891 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 97513BEEA4 for ; Mon, 28 Sep 2015 14:21:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA37C205C7 for ; Mon, 28 Sep 2015 14:21:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F232C20591 for ; Mon, 28 Sep 2015 14:21:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933576AbbI1OVF (ORCPT ); Mon, 28 Sep 2015 10:21:05 -0400 Received: from m12-11.163.com ([220.181.12.11]:48147 "EHLO m12-11.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753829AbbI1OVE (ORCPT ); Mon, 28 Sep 2015 10:21:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=7NCI5N4gVwE9LrcO/R 8HvS7AhUmk5IDrWQdRfLxcgtg=; b=ocgN9xvwQMJ7Nez9eGc2zv7sBlrQFsqv7q YC7nfWSKlgjZ9NRhNzaPpI0OErwQyNb9sIAp0yJ2pr5YhJEf9n7ue+8esUa6CUFW hgfoweo53eXaXWirXaRCAl88PmOxeFzZt1vE+cktxqqx8y/phKydOkTcB5h4uPvV 8xfhF62Rg= Received: from localhost.localdomain (unknown [58.209.166.48]) by smtp7 (Coremail) with SMTP id C8CowEBJjGC+TAlWpuMBDA--.178S3; Mon, 28 Sep 2015 22:20:48 +0800 (CST) From: Yaowei Bai To: viro@zeniv.linux.org.uk, shaggy@kernel.org Cc: jfs-discussion@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/17] fs/jfs: remove unnecessary new_valid_dev check Date: Mon, 28 Sep 2015 22:18:47 +0800 Message-Id: <1443449927-5495-1-git-send-email-bywxiaobai@163.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443446807-4838-1-git-send-email-bywxiaobai@163.com> References: <1443446807-4838-1-git-send-email-bywxiaobai@163.com> X-CM-TRANSID: C8CowEBJjGC+TAlWpuMBDA--.178S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrKrWUury3tFyUGw15Kw4kJFb_yoWDZFXE9r WIyr48Wws7Ar45tw45Gw42yrZ0ywsakwn7J3y5tFsIgrsFqFy3ArWDXrs7XrZ8urZ3WFZ8 ur9rCFy5Ar1UujkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0nFx5UUUUU== X-Originating-IP: [58.209.166.48] X-CM-SenderInfo: xe1z5x5dretxi6rwjhhfrp/xtbBFAKDT1D+ZdAYNwAAsu Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As new_valid_dev always returns 1, so !new_valid_dev check is not needed, remove it. Signed-off-by: Yaowei Bai Acked-by: Dave Kleikamp --- fs/jfs/namei.c | 3 --- fs/jfs/super.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 35976bd..9d7551f 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c @@ -1372,9 +1372,6 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry, tid_t tid; struct tblock *tblk; - if (!new_valid_dev(rdev)) - return -EINVAL; - jfs_info("jfs_mknod: %pd", dentry); rc = dquot_initialize(dir); diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 4cd9798..8f9176c 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -496,9 +496,6 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags); - if (!new_valid_dev(sb->s_bdev->bd_dev)) - return -EOVERFLOW; - sbi = kzalloc(sizeof(struct jfs_sb_info), GFP_KERNEL); if (!sbi) return -ENOMEM;