From: Stephen Champion Date: Sat, 31 May 2014 00:35:45 +0000 (-0700) Subject: LU-5123 procfs: u64 helper does not respect multiplier X-Git-Tag: 2.6.0-RC1~45 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=a66c72c37140e17f600f9cab8f8f3b09374a96c4 LU-5123 procfs: u64 helper does not respect multiplier lprocfs_write_frac_u64_helper should apply the multiplier argument to the value if units are not specified by the user. It has been overriding the multiplier with '1' regardless. Signed-off-by: Stephen Champion Change-Id: Iaacbb6923122479ba1ba4a5ee0088c670245d081 Reviewed-on: http://review.whamcloud.com/10535 Tested-by: Jenkins Reviewed-by: John L. Hammond Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Keith Mannthey Reviewed-by: Andreas Dilger --- diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index d81ebc3..885b4d4 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -2487,7 +2487,7 @@ int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count, } } /* Specified units override the multiplier */ - if (units) + if (units > 1) mult = mult < 0 ? -units : units; frac *= mult;