Skip to content

Commit

Permalink
fs/nilfs2/namei.c: remove unnecessary new_valid_dev() check
Browse files Browse the repository at this point in the history
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>
Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Yaowei Bai authored and Linus Torvalds committed Nov 9, 2015
1 parent 4467e29 commit 3348a17
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/nilfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ nilfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev)
struct nilfs_transaction_info ti;
int err;

if (!new_valid_dev(rdev))
return -EINVAL;

err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
if (err)
return err;
Expand Down

0 comments on commit 3348a17

Please sign in to comment.