mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
ext4: remove redundant goto in ext4_ext_insert_extent()
If eh->eh_entries is smaller than eh->eh_max, the routine will go to the "repeat" and then go to "has_space" directlly , since argument "depth" and "eh" are not even changed. Therefore, goto "has_space" directly and remove redundant "repeat" tag. Signed-off-by: Robin Dong <sanbai@taobao.com>
This commit is contained in:
parent
22612283f7
commit
ffb505ff0f
1 changed files with 1 additions and 2 deletions
|
@ -1723,7 +1723,6 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
|
||||||
goto merge;
|
goto merge;
|
||||||
}
|
}
|
||||||
|
|
||||||
repeat:
|
|
||||||
depth = ext_depth(inode);
|
depth = ext_depth(inode);
|
||||||
eh = path[depth].p_hdr;
|
eh = path[depth].p_hdr;
|
||||||
if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max))
|
if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max))
|
||||||
|
@ -1745,7 +1744,7 @@ repeat:
|
||||||
ext_debug("next leaf isn't full(%d)\n",
|
ext_debug("next leaf isn't full(%d)\n",
|
||||||
le16_to_cpu(eh->eh_entries));
|
le16_to_cpu(eh->eh_entries));
|
||||||
path = npath;
|
path = npath;
|
||||||
goto repeat;
|
goto has_space;
|
||||||
}
|
}
|
||||||
ext_debug("next leaf has no free space(%d,%d)\n",
|
ext_debug("next leaf has no free space(%d,%d)\n",
|
||||||
le16_to_cpu(eh->eh_entries), le16_to_cpu(eh->eh_max));
|
le16_to_cpu(eh->eh_entries), le16_to_cpu(eh->eh_max));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue