From: Yaowei Bai Date: Mon, 9 Nov 2015 22:58:39 +0000 (-0800) Subject: fs/ext2/namei.c: remove unnecessary new_valid_dev() check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7df00072e64f972e0f7eb4fea78eed2da9c0e59;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git fs/ext2/namei.c: remove unnecessary new_valid_dev() check new_valid_dev() always returns 1, so the !new_valid_dev() check is not needed. Remove it. Signed-off-by: Yaowei Bai Cc: Alexander Viro Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index b4841e3066a5..3267a80dbbe2 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -143,9 +143,6 @@ static int ext2_mknod (struct inode * dir, struct dentry *dentry, umode_t mode, struct inode * inode; int err; - if (!new_valid_dev(rdev)) - return -EINVAL; - err = dquot_initialize(dir); if (err) return err;