alloc_nfs_open_context(): remove redundant refcounting
Subsystems (2)
get_rpccred() is called via the
rpcauth_lookupcred() -> rpcauth_lookup_credcache()
path so it seems that alloc_nfs_open_context() itself doesn't need to get_rpccred(). All parents immediately compensate by put_rpccred()
correct?
fs/nfs/inode.c renamed from fs/nfs/inode.c.orig +1 -2
@@ -825,7 +825,7 @@if (ctx !=NULL ) {atomic_set (&ctx->count,1 ); ctx->dentry =dget (dentry); - ctx->cred =get_rpccred (cred); + ctx->cred = cred; ctx->state =NULL ; ctx->lockowner = current->files; ctx->error =0 ;
@@ -909,7 +909,6 @@if ((cred =rpcauth_lookupcred (NFS_CLIENT (inode)->cl_auth,0 )) ==NULL )return -ENOMEM ; ctx =alloc_nfs_open_context (filp->f_dentry, cred); -put_rpccred (cred);if (ctx ==NULL )return -ENOMEM ; ctx->mode = filp->f_mode;
fs/nfs/nfs4proc.c renamed from fs/nfs/nfs4proc.c.orig +0 -1
@@ -2015,7 +2015,6 @@if (unlikely (cred ==NULL ))return -ENOMEM ; ctx =alloc_nfs_open_context (dentry, cred); -put_rpccred (cred);if (unlikely (ctx ==NULL ))return -ENOMEM ; status = -EIO ;/* ERACE actually */
Signature · 11 lines
Frank ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs