]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
fs/btrfs/inode.c: remove unnecessary new_valid_dev() check
authorYaowei Bai <bywxiaobai@163.com>
Wed, 21 Oct 2015 22:13:26 +0000 (09:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 5 Nov 2015 05:11:49 +0000 (16:11 +1100)
new_valid_dev() always returns 1, so the !new_valid_dev() check is not
needed.  Remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <jbacik@fb.com>
Acked-by: David Sterba <dsterba@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/btrfs/inode.c

index 611b66d73e80ba0e5f97b4415595d20f8ae35e1a..0946790ff9ca88576049e0d18c89c0106b169555 100644 (file)
@@ -6268,9 +6268,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