gentoo-overlay/sys-kernel/hardened-kernel/files/linux-6.12/0033-bcachefs-Use-str_write...

42 lines
1.3 KiB
Diff

From dfce49250859cf87c267cf3952dadf8d702ff674 Mon Sep 17 00:00:00 2001
From: Thorsten Blum <thorsten.blum@linux.dev>
Date: Sun, 20 Oct 2024 13:20:46 +0200
Subject: [PATCH 033/233] bcachefs: Use str_write_read() helper in
ec_block_endio()
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
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>
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
fs/bcachefs/ec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index 6e855fe888c2..015107e241cc 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -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);
--
2.45.2