On Tue, 2013-09-10 at 14:55 -0400, Weston Andros Adamson wrote: > Client calls get_rpccred when referencing the machine cred, so it must call > put_rpccred after passing cred to rpc layer. > > This patch also moves nfs4_sp4_init (formerly nfs4_state_protect) to right > before the call to rpc_run_task (and wrappers of rpc_run_task) to minimize > error path cleanup code. > Do we really need this? AFAICS once the clp->cl_machine_cred is set, it isn't freed until the call to nfs_free_client(). In fact, we probably _rely_ on this being the case for SP4_MACH_CRED, since if the machine cred were to change, we'd no longer be able to change our session or lease. IOW: instead of referencing the cred via get/put_rpccred(), maybe we can just feed the current value of clp->cl_machine_cred into the msg->rpc_cred. -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@xxxxxxxxxx www.netapp.com ��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥