Commit 25f1ee3a authored by Wu Fengguang's avatar Wu Fengguang Committed by Theodore Ts'o

ext4: fix build warning

Replace `if' with `goto' to assure gcc that ix has been initialized.
Signed-off-by: default avatarWu Fengguang <wfg@linux.intel.com>
parent 565a9617
...@@ -1160,15 +1160,13 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path, ...@@ -1160,15 +1160,13 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
while (--depth >= 0) { while (--depth >= 0) {
ix = path[depth].p_idx; ix = path[depth].p_idx;
if (ix != EXT_LAST_INDEX(path[depth].p_hdr)) if (ix != EXT_LAST_INDEX(path[depth].p_hdr))
break; goto got_index;
} }
if (depth < 0) { /* we've gone up to the root and found no index to the right */
/* we've gone up to the root and
* found no index to the right */
return 0; return 0;
}
got_index:
/* we've found index to the right, let's /* we've found index to the right, let's
* follow it and find the closest allocated * follow it and find the closest allocated
* block to the right */ * block to the right */
...@@ -1201,7 +1199,6 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path, ...@@ -1201,7 +1199,6 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
*phys = ext_pblock(ex); *phys = ext_pblock(ex);
put_bh(bh); put_bh(bh);
return 0; return 0;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment