aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorRobin Dong <sanbai@taobao.com>2011-07-11 11:43:59 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-07-11 11:43:59 -0400
commitffb505ff0f7b52318dea46dd139107a8371b4ad7 (patch)
treee94a4af0c694d5ce79d512be8e8e390da43b9e66 /fs/ext4/extents.c
parent22612283f7da1ce9849d9b3716010b07a0446fd9 (diff)
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>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index c969ae23a535..9cbdcb2110f5 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1723,7 +1723,6 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
1723 goto merge; 1723 goto merge;
1724 } 1724 }
1725 1725
1726repeat:
1727 depth = ext_depth(inode); 1726 depth = ext_depth(inode);
1728 eh = path[depth].p_hdr; 1727 eh = path[depth].p_hdr;
1729 if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max)) 1728 if (le16_to_cpu(eh->eh_entries) < le16_to_cpu(eh->eh_max))
@@ -1745,7 +1744,7 @@ repeat:
1745 ext_debug("next leaf isn't full(%d)\n", 1744 ext_debug("next leaf isn't full(%d)\n",
1746 le16_to_cpu(eh->eh_entries)); 1745 le16_to_cpu(eh->eh_entries));
1747 path = npath; 1746 path = npath;
1748 goto repeat; 1747 goto has_space;
1749 } 1748 }
1750 ext_debug("next leaf has no free space(%d,%d)\n", 1749 ext_debug("next leaf has no free space(%d,%d)\n",
1751 le16_to_cpu(eh->eh_entries), le16_to_cpu(eh->eh_max)); 1750 le16_to_cpu(eh->eh_entries), le16_to_cpu(eh->eh_max));