diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2024-10-19 14:25:27 +0200 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-12-21 01:36:15 -0500 |
| commit | de902e3b4a9881ae02d414d427ad56cc384c9bf1 (patch) | |
| tree | 01f3c1d2597188bea8c1cb67a0633ec13cc04043 /fs/bcachefs/journal_io.c | |
| parent | bcachefs: Add version check for bch_btree_ptr_v2.sectors_written validate (diff) | |
| download | linux-de902e3b4a9881ae02d414d427ad56cc384c9bf1.tar.gz linux-de902e3b4a9881ae02d414d427ad56cc384c9bf1.zip | |
bcachefs: Use str_write_read() helper function
Remove hard-coded strings by using the helper function str_write_read().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
| -rw-r--r-- | fs/bcachefs/journal_io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index 9bc0caa9d5e4..768a3b950997 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -17,6 +17,8 @@ #include "sb-clean.h" #include "trace.h" +#include <linux/string_choices.h> + void bch2_journal_pos_from_member_info_set(struct bch_fs *c) { lockdep_assert_held(&c->sb_lock); @@ -666,7 +668,7 @@ static void journal_entry_clock_to_text(struct printbuf *out, struct bch_fs *c, struct jset_entry_clock *clock = container_of(entry, struct jset_entry_clock, entry); - prt_printf(out, "%s=%llu", clock->rw ? "write" : "read", le64_to_cpu(clock->time)); + prt_printf(out, "%s=%llu", str_write_read(clock->rw), le64_to_cpu(clock->time)); } static int journal_entry_dev_usage_validate(struct bch_fs *c, |
