Skip to content

Commit

Permalink
jbd2: remove unused 'JBD2_CHECKPOINT_IO_ERROR' and 'j_atomic_flags'
Browse files Browse the repository at this point in the history
Since 'JBD2_CHECKPOINT_IO_ERROR' and j_atomic_flags' are not useful
anymore after fs dev's errseq is imported into jbd2, just remove them.

Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20231213013224.2100050-4-chengzhihao1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Zhihao Cheng authored and Theodore Ts'o committed Jan 5, 2024
1 parent 62ec170 commit 8a4fd33
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
11 changes: 0 additions & 11 deletions fs/jbd2/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh)
struct transaction_chp_stats_s *stats;
transaction_t *transaction;
journal_t *journal;
struct buffer_head *bh = jh2bh(jh);

JBUFFER_TRACE(jh, "entry");

Expand All @@ -569,16 +568,6 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh)

JBUFFER_TRACE(jh, "removing from transaction");

/*
* If we have failed to write the buffer out to disk, the filesystem
* may become inconsistent. We cannot abort the journal here since
* we hold j_list_lock and we have to be careful about races with
* jbd2_journal_destroy(). So mark the writeback IO error in the
* journal here and we abort the journal later from a better context.
*/
if (buffer_write_io_error(bh))
set_bit(JBD2_CHECKPOINT_IO_ERROR, &journal->j_atomic_flags);

__buffer_unlink(jh);
jh->b_cp_transaction = NULL;
percpu_counter_dec(&journal->j_checkpoint_jh_count);
Expand Down
11 changes: 0 additions & 11 deletions include/linux/jbd2.h
Original file line number Diff line number Diff line change
Expand Up @@ -755,11 +755,6 @@ struct journal_s
*/
unsigned long j_flags;

/**
* @j_atomic_flags: Atomic journaling state flags.
*/
unsigned long j_atomic_flags;

/**
* @j_errno:
*
Expand Down Expand Up @@ -1406,12 +1401,6 @@ JBD2_FEATURE_INCOMPAT_FUNCS(fast_commit, FAST_COMMIT)
#define JBD2_JOURNAL_FLUSH_VALID (JBD2_JOURNAL_FLUSH_DISCARD | \
JBD2_JOURNAL_FLUSH_ZEROOUT)

/*
* Journal atomic flag definitions
*/
#define JBD2_CHECKPOINT_IO_ERROR 0x001 /* Detect io error while writing
* buffer back to disk */

/*
* Function declarations for the journaling transaction and buffer
* management
Expand Down

0 comments on commit 8a4fd33

Please sign in to comment.