diff options
author | Salah Triki <salah.triki@gmail.com> | 2016-07-27 05:11:52 +0200 |
---|---|---|
committer | Luis de Bethencourt <luisbg@osg.samsung.com> | 2016-10-08 11:01:19 +0200 |
commit | d84e4a5a09c320e209789d263a26617f6f7324e3 (patch) | |
tree | 2f19618dddb33296e438a10fb0f3bc303acd0335 /fs/befs/datastream.c | |
parent | befs: fix typo in befs_bt_read_node documentation (diff) | |
download | linux-d84e4a5a09c320e209789d263a26617f6f7324e3.tar.xz linux-d84e4a5a09c320e209789d263a26617f6f7324e3.zip |
fs: befs: Remove redundant validation from befs_find_brun_direct
The only caller of befs_find_brun_direct is befs_fblock2brun, which
already validates that the block is within the range of direct blocks.
So remove the duplicate validation.
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Acked-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Diffstat (limited to 'fs/befs/datastream.c')
-rw-r--r-- | fs/befs/datastream.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c index 740fabcd57c0..41ce07766328 100644 --- a/fs/befs/datastream.c +++ b/fs/befs/datastream.c @@ -249,17 +249,9 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data, int i; const befs_block_run *array = data->direct; befs_blocknr_t sum; - befs_blocknr_t max_block = - data->max_direct_range >> BEFS_SB(sb)->block_shift; befs_debug(sb, "---> %s, find %lu", __func__, (unsigned long)blockno); - if (blockno > max_block) { - befs_error(sb, "%s passed block outside of direct region", - __func__); - return BEFS_ERR; - } - for (i = 0, sum = 0; i < BEFS_NUM_DIRECT_BLOCKS; sum += array[i].len, i++) { if (blockno >= sum && blockno < sum + (array[i].len)) { |