Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68775
b: refs/heads/master
c: dd4877b
h: refs/heads/master
i:
  68773: 3462637
  68771: e29d74f
  68767: 6f8c8d9
v: v3
  • Loading branch information
J. Bruce Fields authored and J. Bruce Fields committed Oct 9, 2007
1 parent 2585279 commit 8c5c561
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8ff2a8453cedf38d6d7a0528cb9c308066a3e3e
refs/heads/master: dd4877bfb6f09cb4a294b459b354c8fc8fa66904
33 changes: 0 additions & 33 deletions trunk/fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,28 +344,6 @@ static struct rpc_version * nfs_cb_version[] = {
&nfs_cb_version4,
};

/*
* Use the SETCLIENTID credential
*/
static struct rpc_cred *
nfsd4_lookupcred(struct nfs4_client *clp, int taskflags)
{
struct auth_cred acred;
struct rpc_clnt *clnt = clp->cl_callback.cb_client;
struct rpc_cred *ret;

get_group_info(clp->cl_cred.cr_group_info);
acred.uid = clp->cl_cred.cr_uid;
acred.gid = clp->cl_cred.cr_gid;
acred.group_info = clp->cl_cred.cr_group_info;

dprintk("NFSD: looking up %s cred\n",
clnt->cl_auth->au_ops->au_name);
ret = rpcauth_lookup_credcache(clnt->cl_auth, &acred, taskflags);
put_group_info(clp->cl_cred.cr_group_info);
return ret;
}

/* Reference counting, callback cleanup, etc., all look racy as heck.
* And why is cb_set an atomic? */

Expand All @@ -379,18 +357,13 @@ static int do_probe_callback(void *data)
};
int status;

msg.rpc_cred = nfsd4_lookupcred(clp, 0);
if (IS_ERR(msg.rpc_cred))
goto out;
status = rpc_call_sync(cb->cb_client, &msg, RPC_TASK_SOFT);
put_rpccred(msg.rpc_cred);

if (status) {
rpc_shutdown_client(cb->cb_client);
cb->cb_client = NULL;
} else
atomic_set(&cb->cb_set, 1);
out:
put_nfs4_client(clp);
return 0;
}
Expand Down Expand Up @@ -488,10 +461,6 @@ nfsd4_cb_recall(struct nfs4_delegation *dp)
if ((!atomic_read(&clp->cl_callback.cb_set)) || !clnt)
return;

msg.rpc_cred = nfsd4_lookupcred(clp, 0);
if (IS_ERR(msg.rpc_cred))
goto out;

cbr->cbr_trunc = 0; /* XXX need to implement truncate optimization */
cbr->cbr_dp = dp;

Expand All @@ -512,8 +481,6 @@ nfsd4_cb_recall(struct nfs4_delegation *dp)
status = rpc_call_sync(clnt, &msg, RPC_TASK_SOFT);
}
out_put_cred:
put_rpccred(msg.rpc_cred);
out:
if (status == -EIO)
atomic_set(&clp->cl_callback.cb_set, 0);
/* Success or failure, now we're either waiting for lease expiration
Expand Down

0 comments on commit 8c5c561

Please sign in to comment.