Skip to contentSkip to conversation

bcachefs: Use str_write_read() helper in write_super_endio()

PATCH New Thorsten Blum 1 participant 1 message Oct 26, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcachefs: Use str_write_read() helper in write_super_endio()

Remove hard-coded strings by using the str_write_read() helper function.

---
 fs/bcachefs/super-io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/bcachefs/super-io.c +2 -1
index ce7410d72089..557673ee2535 100644
@@ -23,6 +23,7 @@
 
 #include <linux/backing-dev.h>
 #include <linux/sort.h>
+#include <linux/string_choices.h>
 
 static const struct blk_holder_ops bch2_sb_handle_bdev_ops = {
 };
@@ -873,7 +874,7 @@ static void write_super_endio(struct bio *bio)
 			       ? BCH_MEMBER_ERROR_write
 			       : BCH_MEMBER_ERROR_read,
 			       "superblock %s error: %s",
-			       bio_data_dir(bio) ? "write" : "read",
+			       str_write_read(bio_data_dir(bio)),
 			       bch2_blk_status_to_str(bio->bi_status)))
 		ca->sb_write_error = 1;
 
Signature · 1 line
2.47.0