]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ntfs: use str_plural in ntfs_attr_make_non_resident
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 11 May 2026 09:50:33 +0000 (11:50 +0200)
committerNamjae Jeon <linkinjeon@kernel.org>
Fri, 5 Jun 2026 15:20:01 +0000 (00:20 +0900)
Replace the manual ternary "s" pluralization with str_plural() to
simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/ntfs/attrib.c

index 421c6cdcbb53078aa50eb899eb45e085e34f4d7e..9d676375f25cb0fc14a9eac656d4388cca2b9f5c 100644 (file)
@@ -16,6 +16,7 @@
  * Copyright (c) 2010 Erik Larsson
  */
 
+#include <linux/string_choices.h>
 #include <linux/writeback.h>
 #include <linux/iomap.h>
 
@@ -1855,7 +1856,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;
                }