From patchwork Mon Sep 28 13:55:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaowei Bai X-Patchwork-Id: 7277801 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 8FBF9BEEA4 for ; Mon, 28 Sep 2015 13:58:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC9CD20670 for ; Mon, 28 Sep 2015 13:58:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7932C2065F for ; Mon, 28 Sep 2015 13:58:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933846AbbI1N5t (ORCPT ); Mon, 28 Sep 2015 09:57:49 -0400 Received: from m12-18.163.com ([220.181.12.18]:46482 "EHLO m12-18.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932920AbbI1N5s (ORCPT ); Mon, 28 Sep 2015 09:57:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=faaPX3qKiKMQ7z7q+L c7jmKieD4lSRMUv1AX4h4xKKE=; b=MnSJ50WQzUNeRfxNS5Y+qwVvwx1Pb9EcZl s1LCCvH+628mTmUNSipXdbYZPgYQbmXFHeRXKWjXHgVFbi0Yxz+jXYSAor5hxQ2h 1V4ad4GvLdb6C13kfncoJnB13Vh49xbIZ/FUvz9fi0LGzEoqdBSuv4fNACW8ExQ7 zNLOqmWag= Received: from localhost.localdomain (unknown [58.209.166.48]) by smtp14 (Coremail) with SMTP id EsCowECJ10wuRwlW6LhJAw--.34681S3; Mon, 28 Sep 2015 21:57:03 +0800 (CST) From: Yaowei Bai To: viro@zeniv.linux.org.uk, jaegeuk@kernel.org, cm224.lee@samsung.com, chao2.yu@samsung.com Cc: linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/17] fs/f2fs: remove unnecessary new_valid_dev check Date: Mon, 28 Sep 2015 21:55:02 +0800 Message-Id: <1443448502-5331-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: EsCowECJ10wuRwlW6LhJAw--.34681S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU33C7DUUUU X-Originating-IP: [58.209.166.48] X-CM-SenderInfo: xe1z5x5dretxi6rwjhhfrp/1tbisBCDT1UL3X8EVgAAsC 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/f2fs/namei.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index a680bf3..c87ec52 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -478,9 +478,6 @@ static int f2fs_mknod(struct inode *dir, struct dentry *dentry, struct inode *inode; int err = 0; - if (!new_valid_dev(rdev)) - return -EINVAL; - f2fs_balance_fs(sbi); inode = f2fs_new_inode(dir, mode);