nfsd: do_probe_callback should not clear rpc stats
Subsystems (2)
PATCH 1/1 nfsd: do_probe_callback should not clear rpc stats
Now that cb_stats are static (since commitff7d9756b501744540be65e172d27ee321d86103)
there's no need to clear them.
Initially I thought it might make sense to do that every callback probing but since the stats are per-program and they are shared between possibly several client callback instances, zeroing them out seems like the wrong thing to do.
Note that that commit also introduced a bug since stats.program is also being cleared in the process and it is not restored after the memset as it used to be.
--- fs/nfsd/nfs4callback.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
fs/nfsd/nfs4callback.c +0 -3
@@ -399,9 +399,6 @@ static int do_probe_callback(void *data) __func__, args.program->name, args.program->number, args.program->nrvers, args.version); -/* Initialize rpc_stat */ -memset (args.program->stats,0 ,sizeof (struct rpc_stat )); -/* Create RPC client */ client =rpc_create (&args);if (IS_ERR (client)) {
J. Bruce Fields
AppliedQuoted 10 lines · Benny Halevy
Now that
cb_statsare static (since commitff7d9756b501744540be65e172d27ee321d86103)
there's no need to clear them.Initially I thought it might make sense to do that every callback probing but since the stats are per-program and they are shared between possibly several client callback instances, zeroing them out seems like the wrong thing to do.
Quoted 3 lines
Note that that commit also introduced a bug since stats.program is also being cleared in the process and it is not restored after the memset as it used to be.
Thanks applied.--b.
Quoted 21 lines
Signed-off-by Benny Halevy <[email protected]>--- fs/nfsd/nfs4callback.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)fs/nfsd/nfs4callback.c +0
-3@@ -399,9 +399,6 @@ static int do_probe_callback(void *data) __func__, args.program->name, args.program->number, args.program->nrvers, args.version); -/* Initialize rpc_stat */ -memset (args.program->stats,0 ,sizeof (struct rpc_stat )); -/* Create RPC client */ client =rpc_create (&args);if (IS_ERR (client)) {