From 483c3e3f3988841d087d17b4efb6d016951f06c7 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 5 Dec 2008 19:03:24 -0500 Subject: [PATCH] --- yaml --- r: 127463 b: refs/heads/master c: cab2d3c99165abbba2943f1b269003b17fd3b1cb h: refs/heads/master i: 127461: c2d6b4899739ad4f2693b3c1bbe73e6a096d0637 127459: ac51903121ccc85499df1cd40555eaea07bb1a92 127455: 793b22ec1888dcbc7c483b56f7d96012ffa1ce90 v: v3 --- [refs] | 2 +- trunk/fs/lockd/mon.c | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index c1bb1ac5ef1c..30d5f41b2031 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7e44d3bea21fbb9494930d1cd35ca92a9a4a3279 +refs/heads/master: cab2d3c99165abbba2943f1b269003b17fd3b1cb diff --git a/trunk/fs/lockd/mon.c b/trunk/fs/lockd/mon.c index c8d18cd22b8a..4424b0a5a51f 100644 --- a/trunk/fs/lockd/mon.c +++ b/trunk/fs/lockd/mon.c @@ -31,7 +31,7 @@ enum { }; struct nsm_args { - __be32 addr; /* remote address */ + struct nsm_private *priv; u32 prog; /* RPC callback info */ u32 vers; u32 proc; @@ -101,7 +101,7 @@ nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res) struct rpc_clnt *clnt; int status; struct nsm_args args = { - .addr = nsm_addr_in(nsm)->sin_addr.s_addr, + .priv = &nsm->sm_priv, .prog = NLM_PROGRAM, .vers = 3, .proc = NLMPROC_NSM_NOTIFY, @@ -407,9 +407,6 @@ static int encode_mon_id(struct xdr_stream *xdr, const struct nsm_args *argp) * The "priv" argument may contain private information required * by the NSMPROC_MON call. This information will be supplied in the * NLMPROC_SM_NOTIFY call. - * - * Linux provides the raw IP address of the monitored host, - * left in network byte order. */ static int encode_priv(struct xdr_stream *xdr, const struct nsm_args *argp) { @@ -418,10 +415,7 @@ static int encode_priv(struct xdr_stream *xdr, const struct nsm_args *argp) p = xdr_reserve_space(xdr, SM_PRIV_SIZE); if (unlikely(p == NULL)) return -EIO; - *p++ = argp->addr; - *p++ = 0; - *p++ = 0; - *p++ = 0; + xdr_encode_opaque_fixed(p, argp->priv->data, SM_PRIV_SIZE); return 0; }