Whamcloud - gitweb
LU-9859 libcfs: discard TCD_MAX_TYPES 68/39668/4
authorMr. NeilBrown <neilb@suse.de>
Thu, 13 Aug 2020 12:44:25 +0000 (08:44 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 21:07:53 +0000 (21:07 +0000)
commitbf7f08479fa28fc4c1a0513d4eb75f91c7577227
tree1adb02449fbcf2b90b9f80ee41ea18e8e5c79799
parentfb40f0b62d77d699ad22b635cc8275fbd5d1347f
LU-9859 libcfs: discard TCD_MAX_TYPES

As well as CFS_TCD_TYPE_CNT we have TCD_MAX_TYPES which has a larger
value but a similar meaning.  Discard it and just use
CFS_TCD_TYPE_CNT.

Two places relied on the fact that TCD_MAX_TYPES was larger and so
there would be NULLs at the end of the array.  Change
them to check the array size properly.

Linux-commit: 22627ffa5e7fae0b0b62f90a8f30fc6dae0fff3c

Change-Id: I73a54a409674d3b569bcbaf72e2296209542b74c
Signed-off-by: Mr. NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/39668
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/tracefile.c