[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20241114221438.38775-2-thorsten.blum@linux.dev>
Date: Thu, 14 Nov 2024 23:14:39 +0100
From: Thorsten Blum <thorsten.blum@...ux.dev>
To: "Theodore Ts'o" <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>
Cc: Thorsten Blum <thorsten.blum@...ux.dev>,
linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] ext4: Use str_plural() instead of PLURAL() macro
Remove the custom PLURAL() macro and use the str_plural() function
instead.
Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
---
fs/ext4/orphan.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c
index e5b47dda3317..1320f91c9b3b 100644
--- a/fs/ext4/orphan.c
+++ b/fs/ext4/orphan.c
@@ -4,6 +4,7 @@
#include <linux/fs.h>
#include <linux/quotaops.h>
#include <linux/buffer_head.h>
+#include <linux/string_choices.h>
#include "ext4.h"
#include "ext4_jbd2.h"
@@ -488,14 +489,12 @@ void ext4_orphan_cleanup(struct super_block *sb, struct ext4_super_block *es)
}
}
-#define PLURAL(x) (x), ((x) == 1) ? "" : "s"
-
if (nr_orphans)
ext4_msg(sb, KERN_INFO, "%d orphan inode%s deleted",
- PLURAL(nr_orphans));
+ nr_orphans, str_plural(nr_orphans));
if (nr_truncates)
ext4_msg(sb, KERN_INFO, "%d truncate%s cleaned up",
- PLURAL(nr_truncates));
+ nr_truncates, str_plural(nr_truncates));
#ifdef CONFIG_QUOTA
/* Turn off quotas if they were enabled for orphan cleanup */
if (quota_update) {
--
2.47.0
Powered by blists - more mailing lists