staging: lustre: Use kstrtouint_from_user in ldlm_rw_uint
authorMathias Rav <mathiasrav@gmail.com>
Fri, 19 May 2017 02:49:21 +0000 (22:49 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Jun 2017 08:32:41 +0000 (17:32 +0900)
commit8b23093269c84b0da1201e1949c91d0beb9892ef
tree56801d1818cb91ec7532cf99981f3a8c61defa80
parent93e7ea8ca0ba8959ccd8e7555fe2c3cb3a2530e5
staging: lustre: Use kstrtouint_from_user in ldlm_rw_uint

Clean up the helper functions used to implement "dump_granted_max" in
debugfs.

Replace the lprocfs_rd_uint() and lprocfs_wr_uint() generic callbacks
with a simpler, more direct implementation of ldlm_rw_uint_fops.

There's a slight change in lustre debugfs write semantics: Using kstrtox
causes EINVAL when the written number is followed by other (garbage)
characters, whereas previously the garbage would be ignored and such a
write would succeed.

Signed-off-by: Mathias Rav <mathiasrav@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c