From patchwork Mon Sep 28 14:25:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaowei Bai X-Patchwork-Id: 7277951 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 65EC49F36A for ; Mon, 28 Sep 2015 14:30:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 96F032072E for ; Mon, 28 Sep 2015 14:30:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD08F20723 for ; Mon, 28 Sep 2015 14:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933999AbbI1OaX (ORCPT ); Mon, 28 Sep 2015 10:30:23 -0400 Received: from m12-16.163.com ([220.181.12.16]:59091 "EHLO m12-16.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933318AbbI1OaW (ORCPT ); Mon, 28 Sep 2015 10:30:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=ff7nIrg6uuVdcCiPyj iHf28Rv4bGdsYXnTl/pbVom7w=; b=F2LmC2xP0vK03R4gUb80+3JgeK041Lq4iN IjNExHsp7fW9cuS7TWX59KIDlKbiayFjRercqgxeDGvaEy1cs/aJZxR9cT/PXgm6 HYySTigPHpf1r1/UOGldJemx3mOVvlep0J5qJ0cX8kzwy4WBXcU/oVlcK6Hnl11B IYHgQgvxk= Received: from localhost.localdomain (unknown [58.209.166.48]) by smtp12 (Coremail) with SMTP id EMCowECp+kBiTglWDdGWCQ--.46153S3; Mon, 28 Sep 2015 22:27:47 +0800 (CST) From: Yaowei Bai To: viro@zeniv.linux.org.uk, petr@vandrovec.name, jack@suse.cz, axboe@fb.com, akpm@linux-foundation.org, tj@kernel.org, fabf@skynet.be, dhowells@redhat.com Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/17] fs/ncpfs: remove unnecessary new_valid_dev check Date: Mon, 28 Sep 2015 22:25:46 +0800 Message-Id: <1443450346-5601-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: EMCowECp+kBiTglWDdGWCQ--.46153S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrKrWUury3tFyUGw15uFyrCrg_yoWxCFc_WF 4vyay0qr4Iqw15AwsxGrsIvr9IvF43tr1fCa4rtw1UCa40yayDArn8AFs8ZFZrWw4DCry7 WryUCrZxCry5CjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0zHq3UUUUU== X-Originating-IP: [58.209.166.48] X-CM-SenderInfo: xe1z5x5dretxi6rwjhhfrp/1tbiKwSDT1QG9Wr8aAAAs6 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/ncpfs/dir.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 93575e9..2d9891a 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c @@ -1165,8 +1165,6 @@ out: static int ncp_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) { - if (!new_valid_dev(rdev)) - return -EINVAL; if (ncp_is_nfs_extras(NCP_SERVER(dir), NCP_FINFO(dir)->volNumber)) { ncp_dbg(1, "mode = 0%ho\n", mode); return ncp_create_new(dir, dentry, mode, rdev, 0);