From patchwork Mon Sep 28 14:47:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaowei Bai X-Patchwork-Id: 7278341 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 04792BEEA4 for ; Mon, 28 Sep 2015 14:59:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 33E4E2073D for ; Mon, 28 Sep 2015 14:59:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 564E22073C for ; Mon, 28 Sep 2015 14:59:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933698AbbI1O7S (ORCPT ); Mon, 28 Sep 2015 10:59:18 -0400 Received: from m12-14.163.com ([220.181.12.14]:40799 "EHLO m12-14.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933483AbbI1O7R (ORCPT ); Mon, 28 Sep 2015 10:59:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=05N3uMLEltwbWCkcPB pxLmFPv1szVjhxhl7dGfVafsA=; b=fsy9wfYLtQduIgW8M5kwPdB4g8Pc8cc2nT JREFO2BcGh1CYoMrAdY2Ku2Y9PTKPcULjNmz53SqfMFDtqKMf5STd9/zFTaRbvZM +dXm1QlYkIzUfBNAjOxim7jOT2HgW2P0sZE5sXQeUD7OSW2l4UgDrLE+U9+I7OBz b3uh3vGeo= Received: from localhost.localdomain (unknown [58.209.166.48]) by smtp10 (Coremail) with SMTP id DsCowECpGVViUwlWQNE0DA--.39672S3; Mon, 28 Sep 2015 22:49:08 +0800 (CST) From: Yaowei Bai To: viro@zeniv.linux.org.uk, jack@suse.cz, akpm@linux-foundation.org, osandov@osandov.com, keescook@chromium.org, fabf@skynet.be, dhowells@redhat.com Cc: reiserfs-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/17] fs/reiserfs: remove unnecessary new_valid_dev check Date: Mon, 28 Sep 2015 22:47:07 +0800 Message-Id: <1443451627-5740-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: DsCowECpGVViUwlWQNE0DA--.39672S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrKrWUury3tFyUGw15KFW3Jrb_yoWxZrg_GF yUtF4rXw42yw1Fyw43K34UArn0v3W5Kw18tasYqFy7KFsFy3s8WFyvga95XrWUW398GFy5 urWUCry3Wryj9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU8W7K3UUUUU== X-Originating-IP: [58.209.166.48] X-CM-SenderInfo: xe1z5x5dretxi6rwjhhfrp/1tbisAWDT1UL3X+W9gAAsl 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/reiserfs/namei.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 5f1c9c2..47f9698 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c @@ -712,9 +712,6 @@ static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode 2 * (REISERFS_QUOTA_INIT_BLOCKS(dir->i_sb) + REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb)); - if (!new_valid_dev(rdev)) - return -EINVAL; - retval = dquot_initialize(dir); if (retval) return retval;