diff options
author | Yaowei Bai <bywxiaobai@163.com> | 2015-11-09 14:58:50 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-09 15:11:24 -0800 |
commit | 4467e29f0c48d0fc3e164c39c1eccd1ce230fbe4 (patch) | |
tree | a58741c84536d17ba5ac0ef7871753b86dda8aeb | |
parent | a2a17044094d0816d56a9e151bbf146d89a23010 (diff) | |
download | linux-4467e29f0c48d0fc3e164c39c1eccd1ce230fbe4.tar.gz linux-4467e29f0c48d0fc3e164c39c1eccd1ce230fbe4.tar.bz2 linux-4467e29f0c48d0fc3e164c39c1eccd1ce230fbe4.zip |
fs/ncpfs/dir.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 <bywxiaobai@163.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Petr Vandrovec <petr@vandrovec.name>
Cc: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@fb.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/ncpfs/dir.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 356816e7bc90..f0e3e9e747dd 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c @@ -1165,8 +1165,6 @@ out: static int ncp_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) { - if (!new_valid_dev(rdev)) - return -EINVAL; if (ncp_is_nfs_extras(NCP_SERVER(dir), NCP_FINFO(dir)->volNumber)) { ncp_dbg(1, "mode = 0%ho\n", mode); return ncp_create_new(dir, dentry, mode, rdev, 0); |