Skip to contentSkip to conversation

ntfs: use str_plural in ntfs_attr_make_non_resident

PATCH Applied Thorsten Blum 2 participants 2 messages May 11

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ntfs: use str_plural in ntfs_attr_make_non_resident

Replace the manual ternary "s" pluralization with str_plural() to simplify the code.

---
 fs/ntfs/attrib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/ntfs/attrib.c +2 -1
index 97b660eaa00c..162aad2cd08e 100644
@@ -16,6 +16,7 @@
  * Copyright (c) 2010 Erik Larsson
  */
 
+#include <linux/string_choices.h>
 #include <linux/writeback.h>
 #include <linux/iomap.h>
 
@@ -1857,7 +1858,7 @@ int ntfs_attr_make_non_resident(struct ntfs_inode *ni, const u32 data_size)
 		if (IS_ERR(rl)) {
 			err = PTR_ERR(rl);
 			ntfs_debug("Failed to allocate cluster%s, error code %i.",
-					ntfs_bytes_to_cluster(vol, new_size) > 1 ? "s" : "",
+					str_plural(ntfs_bytes_to_cluster(vol, new_size)),
 					err);
 			goto folio_err_out;
 		}