sscanf is returning the number of items matched in the
input, but we need to return the amount of data
successfully written.
Fixes:
a408e9dd426f ("LU-8066 mdt: migrate procfs files to sysfs")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ib90bd260e745692d11656d0b74820573aaa35550
Reviewed-on: https://review.whamcloud.com/36052
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
/* Remove any extraneous bits from the upcall (e.g. linefeeds) */
down_write(&hash->uc_upcall_rwsem);
- count = sscanf(buffer, "%s", hash->uc_upcall);
+ sscanf(buffer, "%s", hash->uc_upcall);
up_write(&hash->uc_upcall_rwsem);
if (strcmp(hash->uc_name, mdt_obd_name(mdt)) != 0)