ceph: exchange hardcoded value on NAME_MAX
authorViacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Fri, 24 Jan 2025 19:46:23 +0000 (11:46 -0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 27 Jan 2025 15:07:42 +0000 (16:07 +0100)
Initially, ceph_fs_debugfs_init() had temporary
name buffer with hardcoded length of 80 symbols.
Then, it was hardcoded again for 100 symbols.
Finally, it makes sense to exchange hardcoded
value on properly defined constant and 255 symbols
should be enough for any name case.

Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Reviewed-by: Patrick Donnelly <pdonnell@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/debugfs.c

index fdf9dc1..fdd404f 100644 (file)
@@ -412,7 +412,7 @@ void ceph_fs_debugfs_cleanup(struct ceph_fs_client *fsc)
 
 void ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
 {
-       char name[100];
+       char name[NAME_MAX];
 
        doutc(fsc->client, "begin\n");
        fsc->debugfs_congestion_kb =