]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lockd: Rename struct nlm_args to lockd_args
authorChuck Lever <chuck.lever@oracle.com>
Tue, 12 May 2026 18:13:44 +0000 (14:13 -0400)
committerChuck Lever <cel@kernel.org>
Tue, 9 Jun 2026 20:32:59 +0000 (16:32 -0400)
As part of the effort to enable lockd's server-side XDR functions to
be generated from the NLM protocol specification (using xdrgen), the
internal type names must be changed to avoid conflicts with the
machine-generated type names.

Rename struct nlm_args to struct lockd_args to avoid conflicts with
the NLMv3 XDR type definitions that will be introduced when
svcproc.c is converted to use xdrgen.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/clnt4xdr.c
fs/lockd/clntproc.c
fs/lockd/clntxdr.c
fs/lockd/lockd.h
fs/lockd/svcproc.c
fs/lockd/xdr.c
fs/lockd/xdr.h

index 8973711264cbad0f6515a491fbe56d46a5faf60b..d0b08a12fe45e9dbc9f5f400b7fc96fa444aa50c 100644 (file)
@@ -354,7 +354,7 @@ static void nlm4_xdr_enc_testargs(struct rpc_rqst *req,
                                  struct xdr_stream *xdr,
                                  const void *data)
 {
-       const struct nlm_args *args = data;
+       const struct lockd_args *args = data;
        const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
@@ -376,7 +376,7 @@ static void nlm4_xdr_enc_lockargs(struct rpc_rqst *req,
                                  struct xdr_stream *xdr,
                                  const void *data)
 {
-       const struct nlm_args *args = data;
+       const struct lockd_args *args = data;
        const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
@@ -399,7 +399,7 @@ static void nlm4_xdr_enc_cancargs(struct rpc_rqst *req,
                                  struct xdr_stream *xdr,
                                  const void *data)
 {
-       const struct nlm_args *args = data;
+       const struct lockd_args *args = data;
        const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
@@ -418,7 +418,7 @@ static void nlm4_xdr_enc_unlockargs(struct rpc_rqst *req,
                                    struct xdr_stream *xdr,
                                    const void *data)
 {
-       const struct nlm_args *args = data;
+       const struct lockd_args *args = data;
        const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
index 1aa6597ae0b777d91f86f9f05ac75e625dd324f0..abdf2a51caf2dd326c5dc705949dde00f12bb77b 100644 (file)
@@ -128,7 +128,7 @@ static struct nlm_lockowner *nlmclnt_find_lockowner(struct nlm_host *host, fl_ow
  */
 static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl)
 {
-       struct nlm_args *argp = &req->a_args;
+       struct lockd_args *argp = &req->a_args;
        struct lockd_lock *lock = &argp->lock;
        char *nodename = req->a_host->h_rpcclnt->cl_nodename;
 
@@ -266,7 +266,7 @@ nlmclnt_call(const struct cred *cred, struct nlm_rqst *req, u32 proc)
 {
        struct nlm_host *host = req->a_host;
        struct rpc_clnt *clnt;
-       struct nlm_args *argp = &req->a_args;
+       struct lockd_args *argp = &req->a_args;
        struct nlm_res  *resp = &req->a_res;
        struct rpc_message msg = {
                .rpc_argp       = argp,
index efa45f12960d585d29d8b3e5939de20191a6ce11..444a34bc799a530227420628879e8c6e34d4660b 100644 (file)
@@ -355,7 +355,7 @@ static void nlm_xdr_enc_testargs(struct rpc_rqst *req,
                                 struct xdr_stream *xdr,
                                 const void *data)
 {
-       const struct nlm_args *args = data;
+       const struct lockd_args *args = data;
        const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
@@ -377,7 +377,7 @@ static void nlm_xdr_enc_lockargs(struct rpc_rqst *req,
                                 struct xdr_stream *xdr,
                                 const void *data)
 {
-       const struct nlm_args *args = data;
+       const struct lockd_args *args = data;
        const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
@@ -400,7 +400,7 @@ static void nlm_xdr_enc_cancargs(struct rpc_rqst *req,
                                 struct xdr_stream *xdr,
                                 const void *data)
 {
-       const struct nlm_args *args = data;
+       const struct lockd_args *args = data;
        const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
@@ -419,7 +419,7 @@ static void nlm_xdr_enc_unlockargs(struct rpc_rqst *req,
                                   struct xdr_stream *xdr,
                                   const void *data)
 {
-       const struct nlm_args *args = data;
+       const struct lockd_args *args = data;
        const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
index 032790834c7e6ceabe7faaaac5e3672ac4fe6810..a97676639d3e0436f1234f308c988dd6a9e28ec3 100644 (file)
@@ -171,7 +171,7 @@ struct nlm_rqst {
        refcount_t              a_count;
        unsigned int            a_flags;        /* initial RPC task flags */
        struct nlm_host *       a_host;         /* host handle */
-       struct nlm_args         a_args;         /* arguments */
+       struct lockd_args       a_args;         /* arguments */
        struct nlm_res          a_res;          /* result */
        struct nlm_block *      a_block;
        unsigned int            a_retries;      /* Retry count */
index 2e1dbd4e1df93162f9d715ae850611d8d7f14c66..8a49b864f6eed1aa5a305010981436c2dc496536 100644 (file)
@@ -62,7 +62,7 @@ static inline __be32 cast_status(__be32 status)
  * Obtain client and file from arguments
  */
 static __be32
-nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
+nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct lockd_args *argp,
                        struct nlm_host **hostp, struct nlm_file **filp)
 {
        struct nlm_host         *host = NULL;
@@ -136,7 +136,7 @@ nlmsvc_proc_null(struct svc_rqst *rqstp)
 static __be32
 __nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_res *resp)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct nlm_host *host;
        struct nlm_file *file;
        __be32 rc = rpc_success;
@@ -173,7 +173,7 @@ nlmsvc_proc_test(struct svc_rqst *rqstp)
 static __be32
 __nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_res *resp)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct nlm_host *host;
        struct nlm_file *file;
        __be32 rc = rpc_success;
@@ -211,7 +211,7 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp)
 static __be32
 __nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_res *resp)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct nlm_host *host;
        struct nlm_file *file;
        struct net *net = SVC_NET(rqstp);
@@ -253,7 +253,7 @@ nlmsvc_proc_cancel(struct svc_rqst *rqstp)
 static __be32
 __nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_res *resp)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct nlm_host *host;
        struct nlm_file *file;
        struct net *net = SVC_NET(rqstp);
@@ -296,7 +296,7 @@ nlmsvc_proc_unlock(struct svc_rqst *rqstp)
 static __be32
 __nlmsvc_proc_granted(struct svc_rqst *rqstp, struct nlm_res *resp)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
 
        resp->cookie = argp->cookie;
 
@@ -345,7 +345,7 @@ static const struct rpc_call_ops nlmsvc_callback_ops = {
 static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc,
                __be32 (*func)(struct svc_rqst *, struct nlm_res *))
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct nlm_host *host;
        struct nlm_rqst *call;
        __be32 stat;
@@ -411,7 +411,7 @@ nlmsvc_proc_granted_msg(struct svc_rqst *rqstp)
 static __be32
 nlmsvc_proc_share(struct svc_rqst *rqstp)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct nlm_res *resp = rqstp->rq_resp;
        struct nlm_host *host;
        struct nlm_file *file;
@@ -449,7 +449,7 @@ nlmsvc_proc_share(struct svc_rqst *rqstp)
 static __be32
 nlmsvc_proc_unshare(struct svc_rqst *rqstp)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct nlm_res *resp = rqstp->rq_resp;
        struct nlm_host *host;
        struct nlm_file *file;
@@ -486,7 +486,7 @@ nlmsvc_proc_unshare(struct svc_rqst *rqstp)
 static __be32
 nlmsvc_proc_nm_lock(struct svc_rqst *rqstp)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
 
        dprintk("lockd: NM_LOCK       called\n");
 
@@ -500,7 +500,7 @@ nlmsvc_proc_nm_lock(struct svc_rqst *rqstp)
 static __be32
 nlmsvc_proc_free_all(struct svc_rqst *rqstp)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct nlm_host *host;
 
        /* Obtain client */
@@ -582,8 +582,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_test,
                .pc_decode = nlmsvc_decode_testargs,
                .pc_encode = nlmsvc_encode_testres,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St+2+No+Rg,
                .pc_name = "TEST",
@@ -592,8 +592,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_lock,
                .pc_decode = nlmsvc_decode_lockargs,
                .pc_encode = nlmsvc_encode_res,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "LOCK",
@@ -602,8 +602,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_cancel,
                .pc_decode = nlmsvc_decode_cancargs,
                .pc_encode = nlmsvc_encode_res,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "CANCEL",
@@ -612,8 +612,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_unlock,
                .pc_decode = nlmsvc_decode_unlockargs,
                .pc_encode = nlmsvc_encode_res,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "UNLOCK",
@@ -622,8 +622,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_granted,
                .pc_decode = nlmsvc_decode_testargs,
                .pc_encode = nlmsvc_encode_res,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "GRANTED",
@@ -632,8 +632,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_test_msg,
                .pc_decode = nlmsvc_decode_testargs,
                .pc_encode = nlmsvc_encode_void,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "TEST_MSG",
@@ -642,8 +642,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_lock_msg,
                .pc_decode = nlmsvc_decode_lockargs,
                .pc_encode = nlmsvc_encode_void,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "LOCK_MSG",
@@ -652,8 +652,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_cancel_msg,
                .pc_decode = nlmsvc_decode_cancargs,
                .pc_encode = nlmsvc_encode_void,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "CANCEL_MSG",
@@ -662,8 +662,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_unlock_msg,
                .pc_decode = nlmsvc_decode_unlockargs,
                .pc_encode = nlmsvc_encode_void,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "UNLOCK_MSG",
@@ -672,8 +672,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_granted_msg,
                .pc_decode = nlmsvc_decode_testargs,
                .pc_encode = nlmsvc_encode_void,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = St,
                .pc_name = "GRANTED_MSG",
@@ -772,8 +772,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_share,
                .pc_decode = nlmsvc_decode_shareargs,
                .pc_encode = nlmsvc_encode_shareres,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St+1,
                .pc_name = "SHARE",
@@ -782,8 +782,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_unshare,
                .pc_decode = nlmsvc_decode_shareargs,
                .pc_encode = nlmsvc_encode_shareres,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St+1,
                .pc_name = "UNSHARE",
@@ -792,8 +792,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_nm_lock,
                .pc_decode = nlmsvc_decode_lockargs,
                .pc_encode = nlmsvc_encode_res,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_res),
                .pc_xdrressize = Ck+St,
                .pc_name = "NM_LOCK",
@@ -802,8 +802,8 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
                .pc_func = nlmsvc_proc_free_all,
                .pc_decode = nlmsvc_decode_notify,
                .pc_encode = nlmsvc_encode_void,
-               .pc_argsize = sizeof(struct nlm_args),
-               .pc_argzero = sizeof(struct nlm_args),
+               .pc_argsize = sizeof(struct lockd_args),
+               .pc_argzero = sizeof(struct lockd_args),
                .pc_ressize = sizeof(struct nlm_void),
                .pc_xdrressize = 0,
                .pc_name = "FREE_ALL",
@@ -814,7 +814,7 @@ static const struct svc_procedure nlmsvc_procedures[24] = {
  * Storage requirements for XDR arguments and results
  */
 union nlmsvc_xdrstore {
-       struct nlm_args                 args;
+       struct lockd_args               args;
        struct nlm_res                  res;
        struct nlm_reboot               reboot;
 };
index 55868222984a1935703441261c0a6c5f7326c994..0130cdea56423d4aa450a4ad44152c828afac0dd 100644 (file)
@@ -154,7 +154,7 @@ nlmsvc_decode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 bool
 nlmsvc_decode_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        u32 exclusive;
 
        if (!svcxdr_decode_cookie(xdr, &argp->cookie))
@@ -172,7 +172,7 @@ nlmsvc_decode_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 bool
 nlmsvc_decode_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        u32 exclusive;
 
        if (!svcxdr_decode_cookie(xdr, &argp->cookie))
@@ -197,7 +197,7 @@ nlmsvc_decode_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 bool
 nlmsvc_decode_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        u32 exclusive;
 
        if (!svcxdr_decode_cookie(xdr, &argp->cookie))
@@ -217,7 +217,7 @@ nlmsvc_decode_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 bool
 nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
 
        if (!svcxdr_decode_cookie(xdr, &argp->cookie))
                return false;
@@ -270,7 +270,7 @@ nlmsvc_decode_reboot(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 bool
 nlmsvc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct lockd_lock *lock = &argp->lock;
 
        memset(lock, 0, sizeof(*lock));
@@ -297,7 +297,7 @@ nlmsvc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 bool
 nlmsvc_decode_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
-       struct nlm_args *argp = rqstp->rq_argp;
+       struct lockd_args *argp = rqstp->rq_argp;
        struct lockd_lock *lock = &argp->lock;
 
        if (!svcxdr_decode_string(xdr, &lock->caller, &lock->len))
index 805027d9b0fea3116df369d87fa62f14534b0d58..ffdcad0f8680b5ebdf368f49d8b471e859541153 100644 (file)
@@ -57,7 +57,7 @@ struct lockd_cookie {
 /*
  * Generic lockd arguments for all but sm_notify
  */
-struct nlm_args {
+struct lockd_args {
        struct lockd_cookie     cookie;
        struct lockd_lock       lock;
        u32                     block;