diff options
author | 2017-11-30 19:28:22 +0800 | |
---|---|---|
committer | 2018-01-02 19:27:30 -0800 | |
commit | 4c2ac6a86073a4cbcea123f8be84bd4417eae001 (patch) | |
tree | fd357883d941503af7963e60a794e6d85454fbba /tools/perf/scripts/python/check-perf-trace.py | |
parent | f2fs: clean up hash codes (diff) | |
download | linux-dev-4c2ac6a86073a4cbcea123f8be84bd4417eae001.tar.xz linux-dev-4c2ac6a86073a4cbcea123f8be84bd4417eae001.zip |
f2fs: clean up f2fs_map_blocks
f2fs_map_blocks():
if (blkaddr == NEW_ADDR || blkaddr == NULL_ADDR) {
if (create) {
...
} else {
...
if (flag == F2FS_GET_BLOCK_FIEMAP &&
blkaddr == NULL_ADDR) {
...
}
if (flag != F2FS_GET_BLOCK_FIEMAP ||
blkaddr != NEW_ADDR)
goto sync_out;
}
It means we can break the loop in cases of:
a) flag != F2FS_GET_BLOCK_FIEMAP or
b) flag == F2FS_GET_BLOCK_FIEMAP && blkaddr == NULL_ADDR
Condition b) is the same as previous one, so merge operations of them
for readability.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions