Skip to content
Commit 015861ba authored by Robin Dong's avatar Robin Dong Committed by Theodore Ts'o
Browse files

ext4: avoid wasted extent cache lookup if !PUNCH_OUT_EXT



This patch avoids an extraneous lookup of the extent cache
in ext4_ext_map_blocks() when the flag
EXT4_GET_BLOCKS_PUNCH_OUT_EXT is absent.

The existing logic was performing the lookup but not making
use of the result. The patch simply reverses the order of evaluation
in the condition.

Since ext4_ext_in_cache() does not initialize newex on misses, bypassing
its invocation does not introduce any new issue in this regard.

Signed-off-by: default avatarRobin Dong <sanbai@taobao.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: default avatarLukas Czerner <lczerner@redhat.com>
Reviewed-by: default avatarEric Gouriou <egouriou@google.com>
parent c6a0371c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment