]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: Use str_write_read() helper in ec_block_endio()
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 20 Oct 2024 11:20:46 +0000 (13:20 +0200)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 21 Dec 2024 06:36:15 +0000 (01:36 -0500)
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>
fs/bcachefs/ec.c

index 8b727d63af3e8df14dd0d4546f9d6c04b3a4ca3f..b46bf00c4a67440d6ad4ef24bb3de6ec61c7bed8 100644 (file)
@@ -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);