Skip to content

Commit

Permalink
fs/nfs: remove unnecessary new_valid_dev check
Browse files Browse the repository at this point in the history
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
baihuahua authored and trondmypd committed Nov 3, 2015
1 parent 7fc5613 commit 118c916
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1714,9 +1714,6 @@ nfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev)
dfprintk(VFS, "NFS: mknod(%s/%lu), %pd\n",
dir->i_sb->s_id, dir->i_ino, dentry);

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

attr.ia_mode = mode;
attr.ia_valid = ATTR_MODE;

Expand Down

0 comments on commit 118c916

Please sign in to comment.