From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Kleikamp Subject: Re: [Jfs-discussion] [PATCH 11/17] fs/jfs: remove unnecessary new_valid_dev check Date: Mon, 28 Sep 2015 10:42:53 -0500 Message-ID: <56095FFD.7060105@oracle.com> References: <1443446807-4838-1-git-send-email-bywxiaobai@163.com> <1443449927-5495-1-git-send-email-bywxiaobai@163.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org To: Yaowei Bai , viro@zeniv.linux.org.uk Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:49260 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933698AbbI1PnN (ORCPT ); Mon, 28 Sep 2015 11:43:13 -0400 In-Reply-To: <1443449927-5495-1-git-send-email-bywxiaobai@163.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 09/28/2015 09:18 AM, Yaowei Bai wrote: > 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; >