From: Chuck Lever Date: Tue, 12 May 2026 18:13:47 +0000 (-0400) Subject: lockd: Rename struct nlm_share to lockd_share X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94e8b24e7daaa50e3af9c66b3cc6a67c942df875;p=thirdparty%2Fkernel%2Flinux.git lockd: Rename struct nlm_share to lockd_share 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 Signed-off-by: Chuck Lever --- diff --git a/fs/lockd/lockd.h b/fs/lockd/lockd.h index ca389525a1707..5c79681b7e959 100644 --- a/fs/lockd/lockd.h +++ b/fs/lockd/lockd.h @@ -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 */ diff --git a/fs/lockd/share.h b/fs/lockd/share.h index 20ea8ee491682..1ec3ccdb2aef5 100644 --- a/fs/lockd/share.h +++ b/fs/lockd/share.h @@ -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 */ diff --git a/fs/lockd/svcshare.c b/fs/lockd/svcshare.c index 53f5655c128c4..5ac0ec25d62d2 100644 --- a/fs/lockd/svcshare.c +++ b/fs/lockd/svcshare.c @@ -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) {