Skip to content

Commit

Permalink
ext4: "ret" may be used uninitialized in ext4_lazyinit_thread()
Browse files Browse the repository at this point in the history
Newer GCC's reported the following build warning:

   fs/ext4/super.c: In function 'ext4_lazyinit_thread':
   fs/ext4/super.c:2702: warning: 'ret' may be used uninitialized in this function

Fix it by removing the need for the ret variable in the first place.

Signed-off-by: "Lukas Czerner" <lczerner@redhat.com>
Reported-by: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Theodore Ts'o committed Nov 2, 2010
1 parent f4245bd commit b2c78cd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2699,7 +2699,6 @@ static int ext4_lazyinit_thread(void *arg)
struct ext4_li_request *elr;
unsigned long next_wakeup;
DEFINE_WAIT(wait);
int ret;

BUG_ON(NULL == eli);

Expand All @@ -2723,13 +2722,12 @@ static int ext4_lazyinit_thread(void *arg)
elr = list_entry(pos, struct ext4_li_request,
lr_request);

if (time_after_eq(jiffies, elr->lr_next_sched))
ret = ext4_run_li_request(elr);

if (ret) {
ret = 0;
ext4_remove_li_request(elr);
continue;
if (time_after_eq(jiffies, elr->lr_next_sched)) {
if (ext4_run_li_request(elr) != 0) {
/* error, remove the lazy_init job */
ext4_remove_li_request(elr);
continue;
}
}

if (time_before(elr->lr_next_sched, next_wakeup))
Expand Down

0 comments on commit b2c78cd

Please sign in to comment.