Skip to content

Commit f6fc158

Browse files
ebiggerstytso
authored andcommitted
jbd2: remove redundant function jbd2_journal_has_csum_v2or3_feature
Since commit dd348f0 ("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: Eric Biggers <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent e224fa3 commit f6fc158

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

fs/jbd2/journal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,15 +1361,15 @@ static int journal_check_superblock(journal_t *journal)
13611361
return err;
13621362
}
13631363

1364-
if (jbd2_journal_has_csum_v2or3_feature(journal) &&
1364+
if (jbd2_journal_has_csum_v2or3(journal) &&
13651365
jbd2_has_feature_checksum(journal)) {
13661366
/* Can't have checksum v1 and v2 on at the same time! */
13671367
printk(KERN_ERR "JBD2: Can't enable checksumming v1 and v2/3 "
13681368
"at the same time!\n");
13691369
return err;
13701370
}
13711371

1372-
if (jbd2_journal_has_csum_v2or3_feature(journal)) {
1372+
if (jbd2_journal_has_csum_v2or3(journal)) {
13731373
if (sb->s_checksum_type != JBD2_CRC32C_CHKSUM) {
13741374
printk(KERN_ERR "JBD2: Unknown checksum type\n");
13751375
return err;

include/linux/jbd2.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,14 +1727,10 @@ static inline int tid_geq(tid_t x, tid_t y)
17271727
extern int jbd2_journal_blocks_per_page(struct inode *inode);
17281728
extern size_t journal_tag_bytes(journal_t *journal);
17291729

1730-
static inline bool jbd2_journal_has_csum_v2or3_feature(journal_t *j)
1731-
{
1732-
return jbd2_has_feature_csum2(j) || jbd2_has_feature_csum3(j);
1733-
}
1734-
17351730
static inline int jbd2_journal_has_csum_v2or3(journal_t *journal)
17361731
{
1737-
return jbd2_journal_has_csum_v2or3_feature(journal);
1732+
return jbd2_has_feature_csum2(journal) ||
1733+
jbd2_has_feature_csum3(journal);
17381734
}
17391735

17401736
static inline int jbd2_journal_get_num_fc_blks(journal_superblock_t *jsb)

0 commit comments

Comments
 (0)