]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: Use str_write_read() helper in write_super_endio()
authorThorsten Blum <thorsten.blum@linux.dev>
Sat, 26 Oct 2024 10:47:23 +0000 (12:47 +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 str_write_read() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/super-io.c

index 7c71594f6a8bd369100a32539ec4f263d2c4ed50..c83bd3dedb1b9ea7bafb7612b31a0fadfe5fe5e5 100644 (file)
@@ -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 = {
 };
@@ -878,7 +879,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;