]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
fs/ext4/namei.c: remove unnecessary new_valid_dev() check
authorYaowei Bai <bywxiaobai@163.com>
Wed, 21 Oct 2015 22:13:27 +0000 (09:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 2 Nov 2015 03:54:09 +0000 (14:54 +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: Theodore Ts'o <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ext4/namei.c

index 403489ed5f9284660f8bee6b14cf9b3d92121c25..a969ab39f3026187242dbea0881d5ebdb991d978 100644 (file)
@@ -2468,9 +2468,6 @@ static int ext4_mknod(struct inode *dir, struct dentry *dentry,
        struct inode *inode;
        int err, credits, retries = 0;
 
-       if (!new_valid_dev(rdev))
-               return -EINVAL;
-
        err = dquot_initialize(dir);
        if (err)
                return err;