Whamcloud - gitweb
LU-9859 ptlrpc: simplify nrs_tbf_check_id_value and callers
The string passed down to nrs_tbf_check_id_value() is always "token"
in nrs_tbf_id_parse(), which is in 'buffer' in nrs_tbf_parse_cmd() and
is modified in-place there and in
ptlrpc_lprocfs_nrs_tbf_rule_seq_write().
So it must be safe to modify the string in nrs_tbf_check_id_value()
too. So change that function to parse it using the primitives
commonly used in the kernel such as strsep and strim.
Change all callers to use "char *" rather than "struct cfs_lstr".
Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ie67dba002530e4bdfb3c3601a15dc49904f1adcf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50836
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>