]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lockd: Rename struct nlm_share to lockd_share
authorChuck Lever <chuck.lever@oracle.com>
Tue, 12 May 2026 18:13:47 +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_share to struct lockd_share 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/lockd.h
fs/lockd/share.h
fs/lockd/svcshare.c

index ca389525a17070ee1d1d85f42babdad678537814..5c79681b7e9591f65968ffb28c081ebbf845de49 100644 (file)
@@ -179,7 +179,7 @@ struct nlm_rqst {
        void *  a_callback_data; /* sent to nlmclnt_operations callbacks */
 };
 
-struct nlm_share;
+struct lockd_share;
 
 /*
  * This struct describes a file held open by lockd on behalf of
@@ -190,7 +190,7 @@ struct nlm_file {
        struct nfs_fh           f_handle;       /* NFS file handle */
        struct file *           f_file[2];      /* VFS file pointers,
                                                   indexed by O_ flags */
-       struct nlm_share *      f_shares;       /* DOS shares */
+       struct lockd_share *    f_shares;       /* DOS shares */
        struct list_head        f_blocks;       /* blocked locks */
        unsigned int            f_locks;        /* guesstimate # of locks */
        unsigned int            f_count;        /* reference count */
index 20ea8ee4916826a87969a084b0e34d889eab79da..1ec3ccdb2aef5b774e2a1c02a46d5fa7382ad9b0 100644 (file)
@@ -14,8 +14,8 @@
 /*
  * DOS share for a specific file
  */
-struct nlm_share {
-       struct nlm_share *      s_next;         /* linked list */
+struct lockd_share {
+       struct lockd_share *    s_next;         /* linked list */
        struct nlm_host *       s_host;         /* client host */
        struct nlm_file *       s_file;         /* shared file */
        struct xdr_netobj       s_owner;        /* owner handle */
index 53f5655c128c4de4c47728c569bc087607eef1bc..5ac0ec25d62d2909b2fdfedb6b84b5a4368e261c 100644 (file)
@@ -19,7 +19,7 @@
 #include "share.h"
 
 static inline int
-nlm_cmp_owner(struct nlm_share *share, struct xdr_netobj *oh)
+nlm_cmp_owner(struct lockd_share *share, struct xdr_netobj *oh)
 {
        return share->s_owner.len == oh->len
            && !memcmp(share->s_owner.data, oh->data, oh->len);
@@ -39,7 +39,7 @@ __be32
 nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file,
                  struct xdr_netobj *oh, u32 access, u32 mode)
 {
-       struct nlm_share        *share;
+       struct lockd_share      *share;
        u8                      *ohdata;
 
        if (nlmsvc_file_cannot_lock(file))
@@ -85,7 +85,7 @@ __be32
 nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file,
                    struct xdr_netobj *oh)
 {
-       struct nlm_share        *share, **shpp;
+       struct lockd_share      *share, **shpp;
 
        if (nlmsvc_file_cannot_lock(file))
                return nlm_lck_denied_nolocks;
@@ -111,7 +111,7 @@ nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file,
 void nlmsvc_traverse_shares(struct nlm_host *host, struct nlm_file *file,
                nlm_host_match_fn_t match)
 {
-       struct nlm_share        *share, **shpp;
+       struct lockd_share      *share, **shpp;
 
        shpp = &file->f_shares;
        while ((share = *shpp) !=  NULL) {