fs/9p: remove unnecessary new_valid_dev() checks
authorYaowei Bai <bywxiaobai@163.com>
Mon, 9 Nov 2015 22:58:31 +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: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c

index b1dc5188804831af2d58478b700b424e5d78d895..699941e906672b87eb1b5199f7966e29528e0116 100644 (file)
@@ -1368,9 +1368,6 @@ v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rde
                 dir->i_ino, dentry, mode,
                 MAJOR(rdev), MINOR(rdev));
 
-       if (!new_valid_dev(rdev))
-               return -EINVAL;
-
        /* build extension */
        if (S_ISBLK(mode))
                sprintf(name, "b %u %u", MAJOR(rdev), MINOR(rdev));
index e8aa57dc8d6dff5a7a46899d2ba94a4ec0b715b1..cb899af1babc3bf42b48a6064d7f9345ae0bb4a8 100644 (file)
@@ -829,9 +829,6 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
                 dir->i_ino, dentry, omode,
                 MAJOR(rdev), MINOR(rdev));
 
-       if (!new_valid_dev(rdev))
-               return -EINVAL;
-
        v9ses = v9fs_inode2v9ses(dir);
        dir_dentry = dentry->d_parent;
        dfid = v9fs_fid_lookup(dir_dentry);