Commit f6fc1584 authored by Eric Biggers's avatar Eric Biggers Committed by Theodore Ts'o
Browse files

jbd2: remove redundant function jbd2_journal_has_csum_v2or3_feature



Since commit dd348f05 ("jbd2: switch to using the crc32c library"),
jbd2_journal_has_csum_v2or3() and jbd2_journal_has_csum_v2or3_feature()
are the same.  Remove jbd2_journal_has_csum_v2or3_feature() and just
keep jbd2_journal_has_csum_v2or3().

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Link: https://patch.msgid.link/20250207031424.42755-1-ebiggers@kernel.org


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent e224fa3b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1361,7 +1361,7 @@ static int journal_check_superblock(journal_t *journal)
		return err;
	}

	if (jbd2_journal_has_csum_v2or3_feature(journal) &&
	if (jbd2_journal_has_csum_v2or3(journal) &&
	    jbd2_has_feature_checksum(journal)) {
		/* Can't have checksum v1 and v2 on at the same time! */
		printk(KERN_ERR "JBD2: Can't enable checksumming v1 and v2/3 "
@@ -1369,7 +1369,7 @@ static int journal_check_superblock(journal_t *journal)
		return err;
	}

	if (jbd2_journal_has_csum_v2or3_feature(journal)) {
	if (jbd2_journal_has_csum_v2or3(journal)) {
		if (sb->s_checksum_type != JBD2_CRC32C_CHKSUM) {
			printk(KERN_ERR "JBD2: Unknown checksum type\n");
			return err;
+2 −6
Original line number Diff line number Diff line
@@ -1727,14 +1727,10 @@ static inline int tid_geq(tid_t x, tid_t y)
extern int jbd2_journal_blocks_per_page(struct inode *inode);
extern size_t journal_tag_bytes(journal_t *journal);

static inline bool jbd2_journal_has_csum_v2or3_feature(journal_t *j)
{
	return jbd2_has_feature_csum2(j) || jbd2_has_feature_csum3(j);
}

static inline int jbd2_journal_has_csum_v2or3(journal_t *journal)
{
	return jbd2_journal_has_csum_v2or3_feature(journal);
	return jbd2_has_feature_csum2(journal) ||
	       jbd2_has_feature_csum3(journal);
}

static inline int jbd2_journal_get_num_fc_blks(journal_superblock_t *jsb)