]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lockd: Rename struct nlm_lock to lockd_lock
authorChuck Lever <chuck.lever@oracle.com>
Tue, 12 May 2026 18:13:43 +0000 (14:13 -0400)
committerChuck Lever <cel@kernel.org>
Tue, 9 Jun 2026 20:32:59 +0000 (16:32 -0400)
A subsequent patch will convert fs/lockd/svcproc.c to use
machine-generated XDR encoding and decoding functions in a
manner similar to fs/lockd/svc4proc.c. Machine-generated
types derived from the NLM specification will conflict with
the internal types of the same name.

Rename the internal struct nlm_lock type to lockd_lock to
avoid such naming conflicts.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
12 files changed:
fs/lockd/clnt4xdr.c
fs/lockd/clntlock.c
fs/lockd/clntproc.c
fs/lockd/clntxdr.c
fs/lockd/lockd.h
fs/lockd/svc4proc.c
fs/lockd/svclock.c
fs/lockd/svcproc.c
fs/lockd/svcsubs.c
fs/lockd/trace.h
fs/lockd/xdr.c
fs/lockd/xdr.h

index 6d881f9702a92df8050993bfe4b16e0621b2af62..8973711264cbad0f6515a491fbe56d46a5faf60b 100644 (file)
@@ -63,7 +63,7 @@ static s64 loff_t_to_s64(loff_t offset)
        return res;
 }
 
-static void nlm4_compute_offsets(const struct nlm_lock *lock,
+static void nlm4_compute_offsets(const struct lockd_lock *lock,
                                 u64 *l_offset, u64 *l_len)
 {
        const struct file_lock *fl = &lock->fl;
@@ -240,7 +240,7 @@ out_overflow:
 static void encode_nlm4_holder(struct xdr_stream *xdr,
                               const struct nlm_res *result)
 {
-       const struct nlm_lock *lock = &result->lock;
+       const struct lockd_lock *lock = &result->lock;
        u64 l_offset, l_len;
        __be32 *p;
 
@@ -256,7 +256,7 @@ static void encode_nlm4_holder(struct xdr_stream *xdr,
 
 static int decode_nlm4_holder(struct xdr_stream *xdr, struct nlm_res *result)
 {
-       struct nlm_lock *lock = &result->lock;
+       struct lockd_lock *lock = &result->lock;
        struct file_lock *fl = &lock->fl;
        u64 l_offset, l_len;
        u32 exclusive;
@@ -317,7 +317,7 @@ static void encode_caller_name(struct xdr_stream *xdr, const char *name)
  *     };
  */
 static void encode_nlm4_lock(struct xdr_stream *xdr,
-                            const struct nlm_lock *lock)
+                            const struct lockd_lock *lock)
 {
        u64 l_offset, l_len;
        __be32 *p;
@@ -355,7 +355,7 @@ static void nlm4_xdr_enc_testargs(struct rpc_rqst *req,
                                  const void *data)
 {
        const struct nlm_args *args = data;
-       const struct nlm_lock *lock = &args->lock;
+       const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
        encode_bool(xdr, lock->fl.c.flc_type == F_WRLCK);
@@ -377,7 +377,7 @@ static void nlm4_xdr_enc_lockargs(struct rpc_rqst *req,
                                  const void *data)
 {
        const struct nlm_args *args = data;
-       const struct nlm_lock *lock = &args->lock;
+       const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
        encode_bool(xdr, args->block);
@@ -400,7 +400,7 @@ static void nlm4_xdr_enc_cancargs(struct rpc_rqst *req,
                                  const void *data)
 {
        const struct nlm_args *args = data;
-       const struct nlm_lock *lock = &args->lock;
+       const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
        encode_bool(xdr, args->block);
@@ -419,7 +419,7 @@ static void nlm4_xdr_enc_unlockargs(struct rpc_rqst *req,
                                    const void *data)
 {
        const struct nlm_args *args = data;
-       const struct nlm_lock *lock = &args->lock;
+       const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
        encode_nlm4_lock(xdr, lock);
index 8fa30c42c92a28d0b22b8e02a87f7646665b9d37..f797cc99f94d448d6fbcd15bfd925331a9545e92 100644 (file)
@@ -158,7 +158,7 @@ int nlmclnt_wait(struct nlm_wait *block, struct nlm_rqst *req, long timeout)
 /*
  * The server lockd has called us back to tell us the lock was granted
  */
-__be32 nlmclnt_grant(const struct sockaddr *addr, const struct nlm_lock *lock)
+__be32 nlmclnt_grant(const struct sockaddr *addr, const struct lockd_lock *lock)
 {
        const struct file_lock *fl = &lock->fl;
        const struct nfs_fh *fh = &lock->fh;
index 50cfab2f31c7ac9a7f7eca0d54c71b2993c82114..1aa6597ae0b777d91f86f9f05ac75e625dd324f0 100644 (file)
@@ -129,7 +129,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 nlm_lock *lock = &argp->lock;
+       struct lockd_lock *lock = &argp->lock;
        char *nodename = req->a_host->h_rpcclnt->cl_nodename;
 
        nlmclnt_next_cookie(&argp->cookie);
index 2a4d28847254832594d265994babd7176a0d79c5..efa45f12960d585d29d8b3e5939de20191a6ce11 100644 (file)
@@ -60,7 +60,7 @@ static s32 loff_t_to_s32(loff_t offset)
        return res;
 }
 
-static void nlm_compute_offsets(const struct nlm_lock *lock,
+static void nlm_compute_offsets(const struct lockd_lock *lock,
                                u32 *l_offset, u32 *l_len)
 {
        const struct file_lock *fl = &lock->fl;
@@ -236,7 +236,7 @@ out_overflow:
 static void encode_nlm_holder(struct xdr_stream *xdr,
                              const struct nlm_res *result)
 {
-       const struct nlm_lock *lock = &result->lock;
+       const struct lockd_lock *lock = &result->lock;
        u32 l_offset, l_len;
        __be32 *p;
 
@@ -252,7 +252,7 @@ static void encode_nlm_holder(struct xdr_stream *xdr,
 
 static int decode_nlm_holder(struct xdr_stream *xdr, struct nlm_res *result)
 {
-       struct nlm_lock *lock = &result->lock;
+       struct lockd_lock *lock = &result->lock;
        struct file_lock *fl = &lock->fl;
        u32 exclusive, l_offset, l_len;
        int error;
@@ -319,7 +319,7 @@ static void encode_caller_name(struct xdr_stream *xdr, const char *name)
  *     };
  */
 static void encode_nlm_lock(struct xdr_stream *xdr,
-                           const struct nlm_lock *lock)
+                           const struct lockd_lock *lock)
 {
        u32 l_offset, l_len;
        __be32 *p;
@@ -356,7 +356,7 @@ static void nlm_xdr_enc_testargs(struct rpc_rqst *req,
                                 const void *data)
 {
        const struct nlm_args *args = data;
-       const struct nlm_lock *lock = &args->lock;
+       const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
        encode_bool(xdr, lock->fl.c.flc_type == F_WRLCK);
@@ -378,7 +378,7 @@ static void nlm_xdr_enc_lockargs(struct rpc_rqst *req,
                                 const void *data)
 {
        const struct nlm_args *args = data;
-       const struct nlm_lock *lock = &args->lock;
+       const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
        encode_bool(xdr, args->block);
@@ -401,7 +401,7 @@ static void nlm_xdr_enc_cancargs(struct rpc_rqst *req,
                                 const void *data)
 {
        const struct nlm_args *args = data;
-       const struct nlm_lock *lock = &args->lock;
+       const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
        encode_bool(xdr, args->block);
@@ -420,7 +420,7 @@ static void nlm_xdr_enc_unlockargs(struct rpc_rqst *req,
                                   const void *data)
 {
        const struct nlm_args *args = data;
-       const struct nlm_lock *lock = &args->lock;
+       const struct lockd_lock *lock = &args->lock;
 
        encode_cookie(xdr, &args->cookie);
        encode_nlm_lock(xdr, lock);
index 11981856850746b0aee2f93f2d48faee940912ec..032790834c7e6ceabe7faaaac5e3672ac4fe6810 100644 (file)
@@ -253,7 +253,7 @@ void                  nlmclnt_queue_block(struct nlm_wait *block);
 __be32           nlmclnt_dequeue_block(struct nlm_wait *block);
 int              nlmclnt_wait(struct nlm_wait *block, struct nlm_rqst *req, long timeout);
 __be32           nlmclnt_grant(const struct sockaddr *addr,
-                               const struct nlm_lock *lock);
+                               const struct lockd_lock *lock);
 void             nlmclnt_recovery(struct nlm_host *);
 int              nlmclnt_reclaim(struct nlm_host *, struct file_lock *,
                                  struct nlm_rqst *);
@@ -313,13 +313,13 @@ typedef int         (*nlm_host_match_fn_t)(void *cur, struct nlm_host *ref);
  */
 int              lock_to_openmode(struct file_lock *);
 __be32           nlmsvc_lock(struct svc_rqst *, struct nlm_file *,
-                             struct nlm_host *, struct nlm_lock *, int,
+                             struct nlm_host *, struct lockd_lock *, int,
                              struct lockd_cookie *, int);
-__be32           nlmsvc_unlock(struct net *net, struct nlm_file *, struct nlm_lock *);
+__be32           nlmsvc_unlock(struct net *net, struct nlm_file *, struct lockd_lock *);
 __be32           nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
-                       struct nlm_host *host, struct nlm_lock *lock,
-                       struct nlm_lock *conflock);
-__be32           nlmsvc_cancel_blocked(struct net *net, struct nlm_file *, struct nlm_lock *);
+                       struct nlm_host *host, struct lockd_lock *lock,
+                       struct lockd_lock *conflock);
+__be32           nlmsvc_cancel_blocked(struct net *net, struct nlm_file *, struct lockd_lock *);
 void             nlmsvc_retry_blocked(struct svc_rqst *rqstp);
 void             nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,
                                        nlm_host_match_fn_t match);
@@ -332,10 +332,10 @@ int                 nlmsvc_dispatch(struct svc_rqst *rqstp);
  * File handling for the server personality
  */
 __be32           nlm_lookup_file(struct svc_rqst *, struct nlm_file **,
-                                 struct nlm_lock *, int);
+                                 struct lockd_lock *, int);
 void             nlm_release_file(struct nlm_file *);
 void             nlmsvc_put_lockowner(struct nlm_lockowner *);
-void             nlmsvc_release_lockowner(struct nlm_lock *);
+void             nlmsvc_release_lockowner(struct lockd_lock *);
 void             nlmsvc_mark_resources(struct net *);
 void             nlmsvc_free_host_resources(struct nlm_host *);
 void             nlmsvc_invalidate_all(void);
index 249ef49f1bcd1d0a77e09eb8dc48794f9f0d26e6..f7067fae6c868b8bd32b8cb607d3bbdfd023124c 100644 (file)
 #include "nlm4xdr_gen.h"
 
 /*
- * Wrapper structures combine xdrgen types with legacy nlm_lock.
+ * Wrapper structures combine xdrgen types with legacy lockd_lock.
  * The xdrgen field must be first so the structure can be cast
  * to its XDR type for the RPC dispatch layer.
  */
 struct nlm4_testargs_wrapper {
        struct nlm4_testargs            xdrgen;
-       struct nlm_lock                 lock;
+       struct lockd_lock               lock;
 };
 
 static_assert(offsetof(struct nlm4_testargs_wrapper, xdrgen) == 0);
@@ -40,21 +40,21 @@ static_assert(offsetof(struct nlm4_testargs_wrapper, xdrgen) == 0);
 struct nlm4_lockargs_wrapper {
        struct nlm4_lockargs            xdrgen;
        struct lockd_cookie             cookie;
-       struct nlm_lock                 lock;
+       struct lockd_lock               lock;
 };
 
 static_assert(offsetof(struct nlm4_lockargs_wrapper, xdrgen) == 0);
 
 struct nlm4_cancargs_wrapper {
        struct nlm4_cancargs            xdrgen;
-       struct nlm_lock                 lock;
+       struct lockd_lock               lock;
 };
 
 static_assert(offsetof(struct nlm4_cancargs_wrapper, xdrgen) == 0);
 
 struct nlm4_unlockargs_wrapper {
        struct nlm4_unlockargs          xdrgen;
-       struct nlm_lock                 lock;
+       struct lockd_lock               lock;
 };
 
 static_assert(offsetof(struct nlm4_unlockargs_wrapper, xdrgen) == 0);
@@ -74,12 +74,12 @@ static_assert(offsetof(struct nlm4_notify_wrapper, xdrgen) == 0);
 
 struct nlm4_testres_wrapper {
        struct nlm4_testres             xdrgen;
-       struct nlm_lock                 lock;
+       struct lockd_lock               lock;
 };
 
 struct nlm4_shareargs_wrapper {
        struct nlm4_shareargs           xdrgen;
-       struct nlm_lock                 lock;
+       struct lockd_lock               lock;
 };
 
 static_assert(offsetof(struct nlm4_shareargs_wrapper, xdrgen) == 0);
@@ -110,7 +110,7 @@ nlm4_netobj_to_cookie(struct lockd_cookie *cookie, netobj *object)
 }
 
 static __be32
-nlm4_lock_to_nlm_lock(struct nlm_lock *lock, struct nlm4_lock *alock)
+nlm4_lock_to_lockd_lock(struct lockd_lock *lock, struct nlm4_lock *alock)
 {
        if (alock->fh.len > NFS_MAXFHSIZE)
                return nlm_lck_denied;
@@ -142,7 +142,7 @@ nlm4svc_lookup_host(struct svc_rqst *rqstp, string caller, bool monitored)
 
 static __be32
 nlm4svc_lookup_file(struct svc_rqst *rqstp, struct nlm_host *host,
-                   struct nlm_lock *lock, struct nlm_file **filp,
+                   struct lockd_lock *lock, struct nlm_file **filp,
                    struct nlm4_lock *xdr_lock, unsigned char type)
 {
        bool is_test = (rqstp->rq_proc == NLMPROC4_TEST ||
@@ -269,7 +269,7 @@ static __be32 nlm4svc_proc_test(struct svc_rqst *rqstp)
        nlmsvc_release_lockowner(&argp->lock);
 
        if (resp->xdrgen.stat.stat == nlm_lck_denied) {
-               struct nlm_lock *conf = &resp->lock;
+               struct lockd_lock *conf = &resp->lock;
                struct nlm4_holder *holder = &resp->xdrgen.stat.u.holder;
 
                holder->exclusive = (conf->fl.c.flc_type != F_RDLCK);
@@ -527,8 +527,8 @@ nlm4svc_proc_granted(struct svc_rqst *rqstp)
 
        resp->xdrgen.cookie = argp->xdrgen.cookie;
 
-       resp->xdrgen.stat.stat = nlm4_lock_to_nlm_lock(&argp->lock,
-                                                      &argp->xdrgen.alock);
+       resp->xdrgen.stat.stat = nlm4_lock_to_lockd_lock(&argp->lock,
+                                                        &argp->xdrgen.alock);
        if (resp->xdrgen.stat.stat)
                goto out;
 
@@ -842,7 +842,7 @@ __nlm4svc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_res *resp)
        if (nlm4_netobj_to_cookie(&resp->cookie, &argp->xdrgen.cookie))
                goto out;
 
-       if (nlm4_lock_to_nlm_lock(&argp->lock, &argp->xdrgen.alock))
+       if (nlm4_lock_to_lockd_lock(&argp->lock, &argp->xdrgen.alock))
                goto out;
 
        resp->status = nlmclnt_grant(svc_addr(rqstp), &argp->lock);
@@ -982,7 +982,7 @@ static __be32 nlm4svc_proc_share(struct svc_rqst *rqstp)
 {
        struct nlm4_shareargs_wrapper *argp = rqstp->rq_argp;
        struct nlm4_shareres_wrapper *resp = rqstp->rq_resp;
-       struct nlm_lock *lock = &argp->lock;
+       struct lockd_lock *lock = &argp->lock;
        struct nlm_host *host = NULL;
        struct nlm_file *file = NULL;
        struct nlm4_lock xdr_lock = {
@@ -1050,7 +1050,7 @@ static __be32 nlm4svc_proc_unshare(struct svc_rqst *rqstp)
 {
        struct nlm4_shareargs_wrapper *argp = rqstp->rq_argp;
        struct nlm4_shareres_wrapper *resp = rqstp->rq_resp;
-       struct nlm_lock *lock = &argp->lock;
+       struct lockd_lock *lock = &argp->lock;
        struct nlm4_lock xdr_lock = {
                .fh             = argp->xdrgen.share.fh,
                .oh             = argp->xdrgen.share.oh,
index 7fb03042ebee4b0bded655019b53841a1e97920f..e48d31f14a651b83b8ccae94875162bfbb8b1857 100644 (file)
@@ -37,7 +37,7 @@ static void nlmsvc_release_block(struct nlm_block *block);
 static void    nlmsvc_insert_block(struct nlm_block *block, unsigned long);
 static void    nlmsvc_remove_block(struct nlm_block *block);
 
-static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct nlm_lock *lock);
+static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct lockd_lock *lock);
 static void nlmsvc_freegrantargs(struct nlm_rqst *call);
 static const struct rpc_call_ops nlmsvc_grant_ops;
 
@@ -142,7 +142,7 @@ nlmsvc_remove_block(struct nlm_block *block)
  * Find a block for a given lock
  */
 static struct nlm_block *
-nlmsvc_lookup_block(struct nlm_file *file, struct nlm_lock *lock)
+nlmsvc_lookup_block(struct nlm_file *file, struct lockd_lock *lock)
 {
        struct nlm_block        *block;
        struct file_lock        *fl;
@@ -221,7 +221,7 @@ found:
  */
 static struct nlm_block *
 nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_host *host,
-                   struct nlm_file *file, struct nlm_lock *lock,
+                   struct nlm_file *file, struct lockd_lock *lock,
                    struct lockd_cookie *cookie)
 {
        struct nlm_block        *block;
@@ -399,7 +399,7 @@ static struct nlm_lockowner *nlmsvc_find_lockowner(struct nlm_host *host, pid_t
 }
 
 void
-nlmsvc_release_lockowner(struct nlm_lock *lock)
+nlmsvc_release_lockowner(struct lockd_lock *lock)
 {
        if (lock->fl.c.flc_owner)
                nlmsvc_put_lockowner(lock->fl.c.flc_owner);
@@ -415,7 +415,7 @@ void nlmsvc_locks_init_private(struct file_lock *fl, struct nlm_host *host,
  * Initialize arguments for GRANTED call. The nlm_rqst structure
  * has been cleared already.
  */
-static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct nlm_lock *lock)
+static int nlmsvc_setgrantargs(struct nlm_rqst *call, struct lockd_lock *lock)
 {
        locks_copy_lock(&call->a_args.lock.fl, &lock->fl);
        memcpy(&call->a_args.lock.fh, &lock->fh, sizeof(call->a_args.lock.fh));
@@ -476,7 +476,7 @@ nlmsvc_defer_lock_rqst(struct svc_rqst *rqstp, struct nlm_block *block)
  */
 __be32
 nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
-           struct nlm_host *host, struct nlm_lock *lock, int wait,
+           struct nlm_host *host, struct lockd_lock *lock, int wait,
            struct lockd_cookie *cookie, int reclaim)
 {
        struct inode            *inode __maybe_unused = nlmsvc_file_inode(file);
@@ -609,8 +609,8 @@ out:
  */
 __be32
 nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
-               struct nlm_host *host, struct nlm_lock *lock,
-               struct nlm_lock *conflock)
+               struct nlm_host *host, struct lockd_lock *lock,
+               struct lockd_lock *conflock)
 {
        int                     error;
        __be32                  ret;
@@ -669,7 +669,7 @@ out:
  * must be removed.
  */
 __be32
-nlmsvc_unlock(struct net *net, struct nlm_file *file, struct nlm_lock *lock)
+nlmsvc_unlock(struct net *net, struct nlm_file *file, struct lockd_lock *lock)
 {
        int     error = 0;
 
@@ -707,7 +707,7 @@ nlmsvc_unlock(struct net *net, struct nlm_file *file, struct nlm_lock *lock)
  * The calling procedure must check whether the file can be closed.
  */
 __be32
-nlmsvc_cancel_blocked(struct net *net, struct nlm_file *file, struct nlm_lock *lock)
+nlmsvc_cancel_blocked(struct net *net, struct nlm_file *file, struct lockd_lock *lock)
 {
        struct nlm_block        *block;
        int status = 0;
@@ -848,7 +848,7 @@ static void
 nlmsvc_grant_blocked(struct nlm_block *block)
 {
        struct nlm_file         *file = block->b_file;
-       struct nlm_lock         *lock = &block->b_call->a_args.lock;
+       struct lockd_lock       *lock = &block->b_call->a_args.lock;
        int                     mode;
        int                     error;
        loff_t                  fl_start, fl_end;
index 110e186802b6cde2f4374f0282fd23d3d40a9adb..2e1dbd4e1df93162f9d715ae850611d8d7f14c66 100644 (file)
@@ -67,7 +67,7 @@ nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
 {
        struct nlm_host         *host = NULL;
        struct nlm_file         *file = NULL;
-       struct nlm_lock         *lock = &argp->lock;
+       struct lockd_lock       *lock = &argp->lock;
        bool                    is_test = (rqstp->rq_proc == NLMPROC_TEST ||
                                           rqstp->rq_proc == NLMPROC_TEST_MSG);
        int                     mode;
index 9da9d6e0b42e25beab8ec73978817d3576b04a17..e24bacea7e031c4f6aa3a15c0855bd88577c5f70 100644 (file)
@@ -132,7 +132,7 @@ static __be32 nlm_do_fopen(struct svc_rqst *rqstp,
  */
 __be32
 nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
-               struct nlm_lock *lock, int mode)
+               struct lockd_lock *lock, int mode)
 {
        struct nlm_file *file;
        unsigned int    hash;
index 7214d7e96a42424854454bb1dbea6ace1a73cdb4..aa858d9d406dde97cfbf587e149020dab932c24f 100644 (file)
@@ -48,7 +48,7 @@ NLM_STATUS_LIST
 
 DECLARE_EVENT_CLASS(nlmclnt_lock_event,
                TP_PROTO(
-                       const struct nlm_lock *lock,
+                       const struct lockd_lock *lock,
                        const struct sockaddr *addr,
                        unsigned int addrlen,
                        __be32 status
@@ -87,7 +87,7 @@ DECLARE_EVENT_CLASS(nlmclnt_lock_event,
 #define DEFINE_NLMCLNT_EVENT(name)                             \
        DEFINE_EVENT(nlmclnt_lock_event, name,                  \
                        TP_PROTO(                               \
-                               const struct nlm_lock *lock,    \
+                               const struct lockd_lock *lock,  \
                                const struct sockaddr *addr,    \
                                unsigned int addrlen,           \
                                __be32  status                  \
index dfca8b8dab73319cd7a65e134bbde84b05c0ea62..55868222984a1935703441261c0a6c5f7326c994 100644 (file)
@@ -69,7 +69,7 @@ svcxdr_decode_fhandle(struct xdr_stream *xdr, struct nfs_fh *fh)
 }
 
 static bool
-svcxdr_decode_lock(struct xdr_stream *xdr, struct nlm_lock *lock)
+svcxdr_decode_lock(struct xdr_stream *xdr, struct lockd_lock *lock)
 {
        struct file_lock *fl = &lock->fl;
        s32 start, len, end;
@@ -101,7 +101,7 @@ svcxdr_decode_lock(struct xdr_stream *xdr, struct nlm_lock *lock)
 }
 
 static bool
-svcxdr_encode_holder(struct xdr_stream *xdr, const struct nlm_lock *lock)
+svcxdr_encode_holder(struct xdr_stream *xdr, const struct lockd_lock *lock)
 {
        const struct file_lock *fl = &lock->fl;
        s32 start, len;
@@ -271,7 +271,7 @@ bool
 nlmsvc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
        struct nlm_args *argp = rqstp->rq_argp;
-       struct nlm_lock *lock = &argp->lock;
+       struct lockd_lock *lock = &argp->lock;
 
        memset(lock, 0, sizeof(*lock));
        locks_init_lock(&lock->fl);
@@ -298,7 +298,7 @@ bool
 nlmsvc_decode_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr)
 {
        struct nlm_args *argp = rqstp->rq_argp;
-       struct nlm_lock *lock = &argp->lock;
+       struct lockd_lock *lock = &argp->lock;
 
        if (!svcxdr_decode_string(xdr, &lock->caller, &lock->len))
                return false;
index c7e0518862d7eeef4a08ecebd3e039f908ab33ad..805027d9b0fea3116df369d87fa62f14534b0d58 100644 (file)
@@ -32,7 +32,7 @@ struct svc_rqst;
 #define        nlm_lck_denied_grace_period     cpu_to_be32(NLM_LCK_DENIED_GRACE_PERIOD)
 
 /* Lock info passed via NLM */
-struct nlm_lock {
+struct lockd_lock {
        char *                  caller;
        unsigned int            len;    /* length of "caller" */
        struct nfs_fh           fh;
@@ -59,7 +59,7 @@ struct lockd_cookie {
  */
 struct nlm_args {
        struct lockd_cookie     cookie;
-       struct nlm_lock         lock;
+       struct lockd_lock       lock;
        u32                     block;
        u32                     reclaim;
        u32                     state;
@@ -74,7 +74,7 @@ struct nlm_args {
 struct nlm_res {
        struct lockd_cookie     cookie;
        __be32                  status;
-       struct nlm_lock         lock;
+       struct lockd_lock       lock;
 };
 
 /*