Validating the allocation group number is unnecessary since it will be done by iaddr2blockno().
Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/io.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 14eef7d..f9790f5 100644 --- a/fs/befs/io.c +++ b/fs/befs/io.c @@ -28,18 +28,11 @@ befs_bread_iaddr(struct super_block *sb, befs_inode_addr iaddr) { struct buffer_head *bh; befs_blocknr_t block = 0; - struct befs_sb_info *befs_sb = BEFS_SB(sb); befs_debug(sb, "---> Enter %s " "[%u, %hu, %hu]", __func__, iaddr.allocation_group, iaddr.start, iaddr.len); - if (iaddr.allocation_group > befs_sb->num_ags) { - befs_error(sb, "BEFS: Invalid allocation group %u, max is %u", - iaddr.allocation_group, befs_sb->num_ags); - goto error; - } - block = iaddr2blockno(sb, &iaddr); if (block == BEFS_ERR) -- 1.9.1