Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfsd: do_probe_callback should not clear rpc stats

Now that cb_stats are static (since commit
ff7d9756b501744540be65e172d27ee321d86103)
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.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

authored by

Benny Halevy and committed by
J. Bruce Fields
97eb89bb db820d63

-3
-3
fs/nfsd/nfs4callback.c
··· 397 397 addr.sin_port = htons(cb->cb_port); 398 398 addr.sin_addr.s_addr = htonl(cb->cb_addr); 399 399 400 - /* Initialize rpc_stat */ 401 - memset(args.program->stats, 0, sizeof(struct rpc_stat)); 402 - 403 400 /* Create RPC client */ 404 401 client = rpc_create(&args); 405 402 if (IS_ERR(client)) {