ext4: "ret" may be used uninitialized in ext4_lazyinit_thread()
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>
This commit is contained in:
@@ -2699,7 +2699,6 @@ static int ext4_lazyinit_thread(void *arg)
|
|||||||
struct ext4_li_request *elr;
|
struct ext4_li_request *elr;
|
||||||
unsigned long next_wakeup;
|
unsigned long next_wakeup;
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
int ret;
|
|
||||||
|
|
||||||
BUG_ON(NULL == eli);
|
BUG_ON(NULL == eli);
|
||||||
|
|
||||||
@@ -2723,14 +2722,13 @@ cont_thread:
|
|||||||
elr = list_entry(pos, struct ext4_li_request,
|
elr = list_entry(pos, struct ext4_li_request,
|
||||||
lr_request);
|
lr_request);
|
||||||
|
|
||||||
if (time_after_eq(jiffies, elr->lr_next_sched))
|
if (time_after_eq(jiffies, elr->lr_next_sched)) {
|
||||||
ret = ext4_run_li_request(elr);
|
if (ext4_run_li_request(elr) != 0) {
|
||||||
|
/* error, remove the lazy_init job */
|
||||||
if (ret) {
|
|
||||||
ret = 0;
|
|
||||||
ext4_remove_li_request(elr);
|
ext4_remove_li_request(elr);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (time_before(elr->lr_next_sched, next_wakeup))
|
if (time_before(elr->lr_next_sched, next_wakeup))
|
||||||
next_wakeup = elr->lr_next_sched;
|
next_wakeup = elr->lr_next_sched;
|
||||||
|
Reference in New Issue
Block a user