fs/ext2/namei.c: remove unnecessary new_valid_dev() check
authorYaowei Bai <bywxiaobai@163.com>
Mon, 9 Nov 2015 22:58:39 +0000 (14:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 9 Nov 2015 23:11:24 +0000 (15:11 -0800)
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: Jan Kara <jack@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ext2/namei.c

index b4841e3066a5bb15c153c84ab4bc808ee2f2cbc9..3267a80dbbe26f4fbefb14c82fdb832d9169d6a8 100644 (file)
@@ -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;