drivers: staging: lustre: Use mult if units not specified
Units can be passed to lprocfs_write_frac_u64_helper() via a suffix (e.g., "...K", "...M", etc.) tacked onto the value. A comment states that "specified units override the multiplier," though the multiplier is overridden regardless. Update the conditional logic so that it only applies when units are specified. Signed-off-by: Chris Rorvick <chris@rorvick.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
054cd8374f
commit
965bd8b9f7
1 changed files with 1 additions and 1 deletions
|
@ -1908,7 +1908,7 @@ int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count,
|
|||
units <<= 10;
|
||||
}
|
||||
/* Specified units override the multiplier */
|
||||
if (units)
|
||||
if (units > 1)
|
||||
mult = mult < 0 ? -units : units;
|
||||
|
||||
frac *= mult;
|
||||
|
|
Loading…
Add table
Reference in a new issue