Skip to content

Commit be21073

Browse files
tobluxtytso
authored andcommitted
jbd2: use str_plural() to fix Coccinelle warning
Fixes the following Coccinelle/coccicheck warning reported by string_choices.cocci: opportunity for str_plural(dropped) Signed-off-by: Thorsten Blum <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 57802c7 commit be21073

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/jbd2/recovery.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/errno.h>
2020
#include <linux/crc32.h>
2121
#include <linux/blkdev.h>
22+
#include <linux/string_choices.h>
2223
#endif
2324

2425
/*
@@ -374,7 +375,7 @@ int jbd2_journal_skip_recovery(journal_t *journal)
374375
be32_to_cpu(journal->j_superblock->s_sequence);
375376
jbd2_debug(1,
376377
"JBD2: ignoring %d transaction%s from the journal.\n",
377-
dropped, (dropped == 1) ? "" : "s");
378+
dropped, str_plural(dropped));
378379
#endif
379380
journal->j_transaction_sequence = ++info.end_transaction;
380381
journal->j_head = info.head_block;

0 commit comments

Comments
 (0)