aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2010-06-14 13:28:03 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-06-14 13:28:03 -0400
commit5a0790c2c4a18435759a70e1562450035d778339 (patch)
tree80acb12d0e37196cf60ae4ca150c6b556115f302 /fs/jbd2
parent07a038245b28df9196ffb2e8cc626e9b956a4e23 (diff)
ext4: remove initialized but not read variables
No real bugs found, just removed some dead code. Found by gcc 4.6's new warnings. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/journal.c12
-rw-r--r--fs/jbd2/recovery.c10
2 files changed, 2 insertions, 20 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index bc2ff5932769..f7bf15787d68 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1392,13 +1392,9 @@ int jbd2_journal_check_used_features (journal_t *journal, unsigned long compat,
1392int jbd2_journal_check_available_features (journal_t *journal, unsigned long compat, 1392int jbd2_journal_check_available_features (journal_t *journal, unsigned long compat,
1393 unsigned long ro, unsigned long incompat) 1393 unsigned long ro, unsigned long incompat)
1394{ 1394{
1395 journal_superblock_t *sb;
1396
1397 if (!compat && !ro && !incompat) 1395 if (!compat && !ro && !incompat)
1398 return 1; 1396 return 1;
1399 1397
1400 sb = journal->j_superblock;
1401
1402 /* We can support any known requested features iff the 1398 /* We can support any known requested features iff the
1403 * superblock is in version 2. Otherwise we fail to support any 1399 * superblock is in version 2. Otherwise we fail to support any
1404 * extended sb features. */ 1400 * extended sb features. */
@@ -1618,7 +1614,6 @@ int jbd2_journal_flush(journal_t *journal)
1618 1614
1619int jbd2_journal_wipe(journal_t *journal, int write) 1615int jbd2_journal_wipe(journal_t *journal, int write)
1620{ 1616{
1621 journal_superblock_t *sb;
1622 int err = 0; 1617 int err = 0;
1623 1618
1624 J_ASSERT (!(journal->j_flags & JBD2_LOADED)); 1619 J_ASSERT (!(journal->j_flags & JBD2_LOADED));
@@ -1627,8 +1622,6 @@ int jbd2_journal_wipe(journal_t *journal, int write)
1627 if (err) 1622 if (err)
1628 return err; 1623 return err;
1629 1624
1630 sb = journal->j_superblock;
1631
1632 if (!journal->j_tail) 1625 if (!journal->j_tail)
1633 goto no_recovery; 1626 goto no_recovery;
1634 1627
@@ -2202,8 +2195,6 @@ void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode)
2202void jbd2_journal_release_jbd_inode(journal_t *journal, 2195void jbd2_journal_release_jbd_inode(journal_t *journal,
2203 struct jbd2_inode *jinode) 2196 struct jbd2_inode *jinode)
2204{ 2197{
2205 int writeout = 0;
2206
2207 if (!journal) 2198 if (!journal)
2208 return; 2199 return;
2209restart: 2200restart:
@@ -2220,9 +2211,6 @@ restart:
2220 goto restart; 2211 goto restart;
2221 } 2212 }
2222 2213
2223 /* Do we need to wait for data writeback? */
2224 if (journal->j_committing_transaction == jinode->i_transaction)
2225 writeout = 1;
2226 if (jinode->i_transaction) { 2214 if (jinode->i_transaction) {
2227 list_del(&jinode->i_list); 2215 list_del(&jinode->i_list);
2228 jinode->i_transaction = NULL; 2216 jinode->i_transaction = NULL;
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 049281b7cb89..2bc4d5f116f1 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -285,12 +285,10 @@ int jbd2_journal_recover(journal_t *journal)
285int jbd2_journal_skip_recovery(journal_t *journal) 285int jbd2_journal_skip_recovery(journal_t *journal)
286{ 286{
287 int err; 287 int err;
288 journal_superblock_t * sb;
289 288
290 struct recovery_info info; 289 struct recovery_info info;
291 290
292 memset (&info, 0, sizeof(info)); 291 memset (&info, 0, sizeof(info));
293 sb = journal->j_superblock;
294 292
295 err = do_one_pass(journal, &info, PASS_SCAN); 293 err = do_one_pass(journal, &info, PASS_SCAN);
296 294
@@ -299,7 +297,8 @@ int jbd2_journal_skip_recovery(journal_t *journal)
299 ++journal->j_transaction_sequence; 297 ++journal->j_transaction_sequence;
300 } else { 298 } else {
301#ifdef CONFIG_JBD2_DEBUG 299#ifdef CONFIG_JBD2_DEBUG
302 int dropped = info.end_transaction - be32_to_cpu(sb->s_sequence); 300 int dropped = info.end_transaction -
301 be32_to_cpu(journal->j_superblock->s_sequence);
303#endif 302#endif
304 jbd_debug(1, 303 jbd_debug(1,
305 "JBD: ignoring %d transaction%s from the journal.\n", 304 "JBD: ignoring %d transaction%s from the journal.\n",
@@ -365,11 +364,6 @@ static int do_one_pass(journal_t *journal,
365 int tag_bytes = journal_tag_bytes(journal); 364 int tag_bytes = journal_tag_bytes(journal);
366 __u32 crc32_sum = ~0; /* Transactional Checksums */ 365 __u32 crc32_sum = ~0; /* Transactional Checksums */
367 366
368 /* Precompute the maximum metadata descriptors in a descriptor block */
369 int MAX_BLOCKS_PER_DESC;
370 MAX_BLOCKS_PER_DESC = ((journal->j_blocksize-sizeof(journal_header_t))
371 / tag_bytes);
372
373 /* 367 /*
374 * First thing is to establish what we expect to find in the log 368 * First thing is to establish what we expect to find in the log
375 * (in terms of transaction IDs), and where (in terms of log 369 * (in terms of transaction IDs), and where (in terms of log