Re: [PATCH 1/2] NFSv4.1: clean up after using machine cred

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, I thought about this approach, but backed away since we do get/put_rpccred on the cl_machine_cred elsewhere (like nfs4_get_machine_cred_locked).

Shall I submit a new patch that gets rid of get/put_rpccred?

Do we also want to change other uses of cl_machine_cred?

Thanks,
-dros

On Sep 10, 2013, at 3:31 PM, "Myklebust, Trond" <Trond.Myklebust@xxxxxxxxxx>
 wrote:

> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux