diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2022-09-01 10:19:37 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-10-04 23:31:42 +0300 |
commit | 9df6d6f9be4754da96d3c91ec518ed974e6b81e7 (patch) | |
tree | 240ad47c8bbbfd4fc4dafd2582626d1925223086 /fs/f2fs | |
parent | 049ea86cb5c7212a6e7e617a67fe686f9b0b0669 (diff) | |
download | linux-9df6d6f9be4754da96d3c91ec518ed974e6b81e7.tar.xz |
f2fs: remove redundant check in f2fs_sanity_check_cluster
It have checked "compressed" at the entry of
f2fs_sanity_check_cluster, just remove the
redundant check for better performance here.
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/compress.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 6baaff4c52ba..c16bab5bd600 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -912,17 +912,15 @@ bool f2fs_sanity_check_cluster(struct dnode_of_data *dn) reason = "[C|*|C|*]"; goto out; } - if (compressed) { - if (!__is_valid_data_blkaddr(blkaddr)) { - if (!cluster_end) - cluster_end = i; - continue; - } - /* [COMPR_ADDR, NULL_ADDR or NEW_ADDR, valid_blkaddr] */ - if (cluster_end) { - reason = "[C|N|N|V]"; - goto out; - } + if (!__is_valid_data_blkaddr(blkaddr)) { + if (!cluster_end) + cluster_end = i; + continue; + } + /* [COMPR_ADDR, NULL_ADDR or NEW_ADDR, valid_blkaddr] */ + if (cluster_end) { + reason = "[C|N|N|V]"; + goto out; } } return false; |