From 8a0a6dbec5537764958d4863e76de249fdd675a4 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Thu, 10 Oct 2019 21:36:13 -0400 Subject: [PATCH] LU-12726 mdt: Fix usage of sscanf 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 Change-Id: Ib90bd260e745692d11656d0b74820573aaa35550 Reviewed-on: https://review.whamcloud.com/36052 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Sebastien Buisson Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_lproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/mdt/mdt_lproc.c b/lustre/mdt/mdt_lproc.c index a0cf377..1ad735e 100644 --- a/lustre/mdt/mdt_lproc.c +++ b/lustre/mdt/mdt_lproc.c @@ -303,7 +303,7 @@ static ssize_t identity_upcall_store(struct kobject *kobj, /* 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) -- 1.8.3.1