Skip to content

Commit 0f67827

Browse files
Ye Bintytso
authored andcommitted
jbd2: remove useless 'block_error' variable
The judgement 'if (block_error && success == 0)' is never valid. Just remove useless 'block_error' variable. Signed-off-by: Ye Bin <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Zhang Yi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent ac626a3 commit 0f67827

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

fs/jbd2/recovery.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ static __always_inline int jbd2_do_replay(journal_t *journal,
490490
struct buffer_head *bh,
491491
unsigned long *next_log_block,
492492
unsigned int next_commit_ID,
493-
int *success, int *block_error)
493+
int *success)
494494
{
495495
char *tagp;
496496
int flags;
@@ -542,7 +542,6 @@ static __always_inline int jbd2_do_replay(journal_t *journal,
542542
*success = -EFSBADCRC;
543543
pr_err("JBD2: Invalid checksum recovering data block %llu in journal block %lu\n",
544544
blocknr, io_block);
545-
*block_error = 1;
546545
goto skip_write;
547546
}
548547

@@ -596,7 +595,6 @@ static int do_one_pass(journal_t *journal,
596595
unsigned int sequence;
597596
int blocktype;
598597
__u32 crc32_sum = ~0; /* Transactional Checksums */
599-
int block_error = 0;
600598
bool need_check_commit_time = false;
601599
__u64 last_trans_commit_time = 0, commit_time;
602600

@@ -721,8 +719,7 @@ static int do_one_pass(journal_t *journal,
721719
* done here!
722720
*/
723721
err = jbd2_do_replay(journal, info, bh, &next_log_block,
724-
next_commit_ID, &success,
725-
&block_error);
722+
next_commit_ID, &success);
726723
if (err)
727724
goto failed;
728725

@@ -913,8 +910,6 @@ static int do_one_pass(journal_t *journal,
913910
success = err;
914911
}
915912

916-
if (block_error && success == 0)
917-
success = -EIO;
918913
return success;
919914

920915
failed:

0 commit comments

Comments
 (0)