Hi Zetao,
On 2024/8/20 9:32, Li Zetao wrote:
Since the ext4_find_extent() does not return a null pointer, the check for
the null pointer here is redundant. Drop null pointer check for clean
code.
No functional change intended.
Signed-off-by: Li Zetao <lizetao1@xxxxxxxxxx>
---
fs/ext4/extents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index e067f2dd0335..12f0771d57d2 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -6112,7 +6112,7 @@ int ext4_ext_clear_bb(struct inode *inode)
break;
if (ret > 0) {
path = ext4_find_extent(inode, map.m_lblk, NULL, 0);
- if (!IS_ERR_OR_NULL(path)) {
+ if (!IS_ERR(path)) {
for (j = 0; j < path->p_depth; j++) {
ext4_mb_mark_bb(inode->i_sb,
Thanks for the cleanup patch.
But the change is already included in the patch:
https://lore.kernel.org/all/20240710040654.1714672-21-libaokun@xxxxxxxxxxxxxxx/
Thanks,
Baokun