From: Yaowei Bai Date: Mon, 9 Nov 2015 22:58:34 +0000 (-0800) Subject: fs/btrfs/inode.c: remove unnecessary new_valid_dev() check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7cac0a85992229a631d4e01934d2e1c042566189;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git fs/btrfs/inode.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: Chris Mason Cc: Josef Bacik Acked-by: David Sterba Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 4439fbb4ff45..0e4f2bfcc37d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6360,9 +6360,6 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry, u64 objectid; u64 index = 0; - if (!new_valid_dev(rdev)) - return -EINVAL; - /* * 2 for inode item and ref * 2 for dir items