nfsd4: minor cb_recall simplification
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 21 Mar 2013 14:59:29 +0000 (10:59 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 4 Apr 2013 17:25:14 +0000 (13:25 -0400)
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4callback.c

index 99bc85ff02179f3e28ed36f56872e1e48d190e21..be3ff0f3ff686bf51a3e6a04612373b90eb9409b 100644 (file)
@@ -817,8 +817,7 @@ static bool nfsd41_cb_get_slot(struct nfs4_client *clp, struct rpc_task *task)
 static void nfsd4_cb_prepare(struct rpc_task *task, void *calldata)
 {
        struct nfsd4_callback *cb = calldata;
-       struct nfs4_delegation *dp = container_of(cb, struct nfs4_delegation, dl_recall);
-       struct nfs4_client *clp = dp->dl_stid.sc_client;
+       struct nfs4_client *clp = cb->cb_clp;
        u32 minorversion = clp->cl_minorversion;
 
        cb->cb_minorversion = minorversion;
@@ -839,8 +838,7 @@ static void nfsd4_cb_prepare(struct rpc_task *task, void *calldata)
 static void nfsd4_cb_done(struct rpc_task *task, void *calldata)
 {
        struct nfsd4_callback *cb = calldata;
-       struct nfs4_delegation *dp = container_of(cb, struct nfs4_delegation, dl_recall);
-       struct nfs4_client *clp = dp->dl_stid.sc_client;
+       struct nfs4_client *clp = cb->cb_clp;
 
        dprintk("%s: minorversion=%d\n", __func__,
                clp->cl_minorversion);
@@ -863,7 +861,7 @@ static void nfsd4_cb_recall_done(struct rpc_task *task, void *calldata)
 {
        struct nfsd4_callback *cb = calldata;
        struct nfs4_delegation *dp = container_of(cb, struct nfs4_delegation, dl_recall);
-       struct nfs4_client *clp = dp->dl_stid.sc_client;
+       struct nfs4_client *clp = cb->cb_clp;
        struct rpc_clnt *current_rpc_client = clp->cl_cb_client;
 
        nfsd4_cb_done(task, calldata);