diff options
author | Theodore Ts'o <tytso@mit.edu> | 2010-11-02 14:19:30 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-11-02 14:19:30 -0400 |
commit | b2c78cd09b6ef78c8f20190f0b3e6df1d3651b70 (patch) | |
tree | d137e42bb765f5ea2b9bf9692ab7f965422447ec | |
parent | f4245bd4ebf903541ba758ad06c118626d8c6f18 (diff) | |
download | kernel_samsung_crespo-b2c78cd09b6ef78c8f20190f0b3e6df1d3651b70.zip kernel_samsung_crespo-b2c78cd09b6ef78c8f20190f0b3e6df1d3651b70.tar.gz kernel_samsung_crespo-b2c78cd09b6ef78c8f20190f0b3e6df1d3651b70.tar.bz2 |
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>
-rw-r--r-- | fs/ext4/super.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 8d1d942..4d7ef31 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -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); @@ -2723,13 +2722,12 @@ cont_thread: 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)) |