Skip to contentSkip to conversation

bcachefs: Use str_write_read() helper in ec_block_endio()

PATCH Applied Thorsten Blum 2 participants 2 messages Oct 20, 2024

lore
Share & tools
lore
#0 lore raw

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

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

---
 fs/bcachefs/ec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/bcachefs/ec.c +2 -1
index e410cfe37b1a..26b1664adb4d 100644
@@ -26,6 +26,7 @@
 #include "util.h"
 
 #include <linux/sort.h>
+#include <linux/string_choices.h>
 
 #ifdef __KERNEL__
 
@@ -732,7 +733,7 @@ static void ec_block_endio(struct bio *bio)
 			       ? BCH_MEMBER_ERROR_write
 			       : BCH_MEMBER_ERROR_read,
 			       "erasure coding %s error: %s",
-			       bio_data_dir(bio) ? "write" : "read",
+			       str_write_read(bio_data_dir(bio)),
 			       bch2_blk_status_to_str(bio->bi_status)))
 		clear_bit(ec_bio->idx, ec_bio->buf->valid);
 
Signature · 1 line
2.47.0