linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: trond.myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 10/12] NFS: Simplify arguments of encode_renew()
Date: Fri, 02 Mar 2012 16:59:48 -0500	[thread overview]
Message-ID: <20120302215948.12758.51890.stgit@degas.1015granger.net> (raw)
In-Reply-To: <20120302215559.12758.39526.stgit@degas.1015granger.net>

Clean up: pass just the clientid4 to encode_renew().  This enables it
to be used by callers who might not have an full nfs_client.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/nfs/nfs4xdr.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index ea01e31..d53c21e 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1619,13 +1619,14 @@ static void encode_rename(struct xdr_stream *xdr, const struct qstr *oldname, co
 	hdr->replen += decode_rename_maxsz;
 }
 
-static void encode_renew(struct xdr_stream *xdr, const struct nfs_client *client_stateid, struct compound_hdr *hdr)
+static void encode_renew(struct xdr_stream *xdr, clientid4 clid,
+			 struct compound_hdr *hdr)
 {
 	__be32 *p;
 
 	p = reserve_space(xdr, 12);
 	*p++ = cpu_to_be32(OP_RENEW);
-	xdr_encode_hyper(p, client_stateid->cl_clientid);
+	xdr_encode_hyper(p, clid);
 	hdr->nops++;
 	hdr->replen += decode_renew_maxsz;
 }
@@ -2650,7 +2651,7 @@ static void nfs4_xdr_enc_renew(struct rpc_rqst *req, struct xdr_stream *xdr,
 	};
 
 	encode_compound_hdr(xdr, req, &hdr);
-	encode_renew(xdr, clp, &hdr);
+	encode_renew(xdr, clp->cl_clientid, &hdr);
 	encode_nops(&hdr);
 }
 


  parent reply	other threads:[~2012-03-02 21:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02 21:58 [PATCH 00/12] For 3.4 (3rd take) Chuck Lever
2012-03-02 21:58 ` [PATCH 01/12] NFS: Make nfs_cache_array.size a signed integer Chuck Lever
2012-03-02 21:58 ` [PATCH 02/12] NFS: Clean up debugging in decode_pathname() Chuck Lever
2012-03-02 21:58 ` [PATCH 03/12] NFS: Add debugging messages to NFSv4's CLOSE procedure Chuck Lever
2012-03-02 21:58 ` [PATCH 04/12] NFS: Reduce debugging noise from encode_compound_hdr Chuck Lever
2012-03-02 21:59 ` [PATCH 05/12] SUNRPC: Use RCU to dereference the rpc_clnt.cl_xprt field Chuck Lever
2012-03-02 21:59 ` [PATCH 06/12] SUNRPC: Move clnt->cl_server into struct rpc_xprt Chuck Lever
2012-03-02 21:59 ` [PATCH 07/12] SUNRPC: Add API to acquire source address Chuck Lever
2012-03-02 21:59 ` [PATCH 08/12] commit 6f38b4ba433ac6494f83cb73dd07dcbde797e1e0 Chuck Lever
2012-03-03  9:31   ` Christoph Hellwig
2012-03-03 16:29     ` Myklebust, Trond
2012-03-02 21:59 ` [PATCH 09/12] NFS: Add a client-side function to display NFS file handles Chuck Lever
2012-03-02 21:59 ` Chuck Lever [this message]
2012-03-02 21:59 ` [PATCH 11/12] NFS: Introduce NFS_ATTR_FATTR_V4_LOCATIONS Chuck Lever
2012-03-02 22:00 ` [PATCH 12/12] NFS: Request fh_expire_type attribute in "server caps" operation Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120302215948.12758.51890.stgit@degas.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@netapp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).