aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2008-11-25 17:24:23 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-11-25 17:24:23 -0500
commit25f1ee3aba17584ba4810da892175acab7fff9c8 (patch)
treee05da5e03396a3660f71df07bcbedb3023f4b6a4 /fs
parent565a9617b2151e21b22700e97a8b04e70e103153 (diff)
ext4: fix build warning
Replace `if' with `goto' to assure gcc that ix has been initialized. Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/extents.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 59401d057c69..0917be51f102 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1160,15 +1160,13 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
1160 while (--depth >= 0) { 1160 while (--depth >= 0) {
1161 ix = path[depth].p_idx; 1161 ix = path[depth].p_idx;
1162 if (ix != EXT_LAST_INDEX(path[depth].p_hdr)) 1162 if (ix != EXT_LAST_INDEX(path[depth].p_hdr))
1163 break; 1163 goto got_index;
1164 } 1164 }
1165 1165
1166 if (depth < 0) { 1166 /* we've gone up to the root and found no index to the right */
1167 /* we've gone up to the root and 1167 return 0;
1168 * found no index to the right */
1169 return 0;
1170 }
1171 1168
1169got_index:
1172 /* we've found index to the right, let's 1170 /* we've found index to the right, let's
1173 * follow it and find the closest allocated 1171 * follow it and find the closest allocated
1174 * block to the right */ 1172 * block to the right */
@@ -1201,7 +1199,6 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
1201 *phys = ext_pblock(ex); 1199 *phys = ext_pblock(ex);
1202 put_bh(bh); 1200 put_bh(bh);
1203 return 0; 1201 return 0;
1204
1205} 1202}
1206 1203
1207/* 1204/*