Skip to content

Commit

Permalink
fs/jfs: remove unnecessary new_valid_dev() checks
Browse files Browse the repository at this point in the history
new_valid_dev() always returns 1, so the !new_valid_dev() checks are not
needed.  Remove them.

Signed-off-by: Yaowei Bai <[email protected]>
Cc: Alexander Viro <[email protected]>
Acked-by: Dave Kleikamp <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
baihuahua authored and torvalds committed Nov 9, 2015
1 parent fdca5e6 commit a2a1704
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions fs/jfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1372,9 +1372,6 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry,
tid_t tid;
struct tblock *tblk;

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

jfs_info("jfs_mknod: %pd", dentry);

rc = dquot_initialize(dir);
Expand Down
3 changes: 0 additions & 3 deletions fs/jfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,6 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)

jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags);

if (!new_valid_dev(sb->s_bdev->bd_dev))
return -EOVERFLOW;

sbi = kzalloc(sizeof(struct jfs_sb_info), GFP_KERNEL);
if (!sbi)
return -ENOMEM;
Expand Down

0 comments on commit a2a1704

Please sign in to comment.