Message ID | 20230704134233.110812-10-yi.zhang@huaweicloud.com |
---|---|
State | Superseded |
Headers | show |
Series | ext4,jbd2: cleanup journal load and initialization process | expand |
On Tue 04-07-23 21:42:30, Zhang Yi wrote: > From: Zhang Yi <yi.zhang@huawei.com> > > no_recovery is redundant, just drop it. > > Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Looks good. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > fs/jbd2/journal.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c > index 065b5e789299..cc344b8d7476 100644 > --- a/fs/jbd2/journal.c > +++ b/fs/jbd2/journal.c > @@ -2506,12 +2506,12 @@ int jbd2_journal_flush(journal_t *journal, unsigned int flags) > > int jbd2_journal_wipe(journal_t *journal, int write) > { > - int err = 0; > + int err; > > J_ASSERT (!(journal->j_flags & JBD2_LOADED)); > > if (!journal->j_tail) > - goto no_recovery; > + return 0; > > printk(KERN_WARNING "JBD2: %s recovery information on journal\n", > write ? "Clearing" : "Ignoring"); > @@ -2524,7 +2524,6 @@ int jbd2_journal_wipe(journal_t *journal, int write) > mutex_unlock(&journal->j_checkpoint_mutex); > } > > - no_recovery: > return err; > } > > -- > 2.39.2 >
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 065b5e789299..cc344b8d7476 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -2506,12 +2506,12 @@ int jbd2_journal_flush(journal_t *journal, unsigned int flags) int jbd2_journal_wipe(journal_t *journal, int write) { - int err = 0; + int err; J_ASSERT (!(journal->j_flags & JBD2_LOADED)); if (!journal->j_tail) - goto no_recovery; + return 0; printk(KERN_WARNING "JBD2: %s recovery information on journal\n", write ? "Clearing" : "Ignoring"); @@ -2524,7 +2524,6 @@ int jbd2_journal_wipe(journal_t *journal, int write) mutex_unlock(&journal->j_checkpoint_mutex); } - no_recovery: return err; }