Skip to content

Commit 3981be1

Browse files
dubeykoidryomov
authored andcommitted
ceph: exchange hardcoded value on NAME_MAX
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>
1 parent 2f0805d commit 3981be1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ceph/debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ void ceph_fs_debugfs_cleanup(struct ceph_fs_client *fsc)
412412

413413
void ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
414414
{
415-
char name[100];
415+
char name[NAME_MAX];
416416

417417
doutc(fsc->client, "begin\n");
418418
fsc->debugfs_congestion_kb =

0 commit comments

Comments
 (0)