From patchwork Mon Sep 28 14:11:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaowei Bai X-Patchwork-Id: 7277971 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 90582BEEA4 for ; Mon, 28 Sep 2015 14:35:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B524120712 for ; Mon, 28 Sep 2015 14:35:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D44D820576 for ; Mon, 28 Sep 2015 14:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933603AbbI1Oeo (ORCPT ); Mon, 28 Sep 2015 10:34:44 -0400 Received: from m12-18.163.com ([220.181.12.18]:52426 "EHLO m12-18.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757039AbbI1Oeo (ORCPT ); Mon, 28 Sep 2015 10:34:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=gaMCNKvJZT0+h33f6c 1wIiU+npYvVTJDxa3x9jun+EU=; b=eOB8Y/+gcpqXiQVeflasevsWNeFFemki1d MEkjhFXa3QjvYXONGvCgEHaWRTabzINzfxy++xnlU04OKSsmhdlVlr7BOk2zgwci bJ/q67kxrCc/Jxoo5xdo055bCNtnrBk1S+y+TcgctiFgTvwMU/RlH52Wx2XJkJqX s1eI1XuF8= Received: from localhost.localdomain (unknown [58.209.166.48]) by smtp14 (Coremail) with SMTP id EsCowECZIFsASwlWAGtKAw--.34582S3; Mon, 28 Sep 2015 22:13:21 +0800 (CST) From: Yaowei Bai To: viro@zeniv.linux.org.uk, mikulas@artax.karlin.mff.cuni.cz Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check Date: Mon, 28 Sep 2015 22:11:19 +0800 Message-Id: <1443449479-5379-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: EsCowECZIFsASwlWAGtKAw--.34582S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrKrWUury3tFyUGw15try5Arb_yoW3Gwb_Cr Wjyr48uwsrJw1fJws8G3yaqr13Kan0yrn3K34vqw12qFWjv395ZFyqgws0y3yUWw45WFWU ur97CFy3ur98ujkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU8JCzJUUUUU== X-Originating-IP: [58.209.166.48] X-CM-SenderInfo: xe1z5x5dretxi6rwjhhfrp/1tbiKxSDT1QG9Wqj6QABs1 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 --- fs/hpfs/namei.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index 9e92c9c..ae4d5a1 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs/namei.c @@ -227,8 +227,6 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, de int err; if ((err = hpfs_chk_name(name, &len))) return err==-ENOENT ? -EINVAL : err; if (hpfs_sb(dir->i_sb)->sb_eas < 2) return -EPERM; - if (!new_valid_dev(rdev)) - return -EINVAL; hpfs_lock(dir->i_sb); err = -ENOSPC; fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh);