Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 May 2020 01:43:01 +0000 (UTC)
From:      Ryan Moeller <freqlabs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r361236 - in stable: 11/sys/fs/nfs 11/sys/fs/nfsclient 11/sys/fs/nfsserver 12/sys/fs/nfs 12/sys/fs/nfsclient 12/sys/fs/nfsserver
Message-ID:  <202005190143.04J1h13M070549@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: freqlabs
Date: Tue May 19 01:43:00 2020
New Revision: 361236
URL: https://svnweb.freebsd.org/changeset/base/361236

Log:
  MFC r360960:
  
  nfs: Remove APPLESTATIC macro
  
  It is no longer useful.
  
  Reviewed by:    rmacklem
  Approved by:    mav (mentor)
  Sponsored by:   iXsystems, Inc.
  Differential Revision:  https://reviews.freebsd.org/D24811

Modified:
  stable/11/sys/fs/nfs/nfs_commonacl.c
  stable/11/sys/fs/nfs/nfs_commonsubs.c
  stable/11/sys/fs/nfs/nfsport.h
  stable/11/sys/fs/nfsclient/nfs_clcomsubs.c
  stable/11/sys/fs/nfsclient/nfs_clport.c
  stable/11/sys/fs/nfsclient/nfs_clrpcops.c
  stable/11/sys/fs/nfsclient/nfs_clstate.c
  stable/11/sys/fs/nfsserver/nfs_nfsdcache.c
  stable/11/sys/fs/nfsserver/nfs_nfsdserv.c
  stable/11/sys/fs/nfsserver/nfs_nfsdsocket.c
  stable/11/sys/fs/nfsserver/nfs_nfsdstate.c
  stable/11/sys/fs/nfsserver/nfs_nfsdsubs.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/fs/nfs/nfs_commonacl.c
  stable/12/sys/fs/nfs/nfs_commonsubs.c
  stable/12/sys/fs/nfs/nfsport.h
  stable/12/sys/fs/nfsclient/nfs_clcomsubs.c
  stable/12/sys/fs/nfsclient/nfs_clport.c
  stable/12/sys/fs/nfsclient/nfs_clrpcops.c
  stable/12/sys/fs/nfsclient/nfs_clstate.c
  stable/12/sys/fs/nfsserver/nfs_nfsdcache.c
  stable/12/sys/fs/nfsserver/nfs_nfsdserv.c
  stable/12/sys/fs/nfsserver/nfs_nfsdsocket.c
  stable/12/sys/fs/nfsserver/nfs_nfsdstate.c
  stable/12/sys/fs/nfsserver/nfs_nfsdsubs.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/fs/nfs/nfs_commonacl.c
==============================================================================
--- stable/11/sys/fs/nfs/nfs_commonacl.c	Tue May 19 01:40:45 2020	(r361235)
+++ stable/11/sys/fs/nfs/nfs_commonacl.c	Tue May 19 01:43:00 2020	(r361236)
@@ -38,7 +38,7 @@ static int nfsrv_acemasktoperm(u_int32_t acetype, u_in
 /*
  * Handle xdr for an ace.
  */
-APPLESTATIC int
+int
 nfsrv_dissectace(struct nfsrv_descript *nd, struct acl_entry *acep,
     int *aceerrp, int *acesizep, NFSPROC_T *p)
 {
@@ -386,7 +386,7 @@ nfsrv_buildace(struct nfsrv_descript *nd, u_char *name
 /*
  * Build an NFSv4 ACL.
  */
-APPLESTATIC int
+int
 nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *aclp, enum vtype type,
     NFSPROC_T *p)
 {
@@ -448,7 +448,7 @@ nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *ac
 /*
  * Set an NFSv4 acl.
  */
-APPLESTATIC int
+int
 nfsrv_setacl(vnode_t vp, NFSACL_T *aclp, struct ucred *cred,
     NFSPROC_T *p)
 {
@@ -479,7 +479,7 @@ out:
  * Compare two NFSv4 acls.
  * Return 0 if they are the same, 1 if not the same.
  */
-APPLESTATIC int
+int
 nfsrv_compareacl(NFSACL_T *aclp1, NFSACL_T *aclp2)
 {
 	int i;

Modified: stable/11/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- stable/11/sys/fs/nfs/nfs_commonsubs.c	Tue May 19 01:40:45 2020	(r361235)
+++ stable/11/sys/fs/nfs/nfs_commonsubs.c	Tue May 19 01:43:00 2020	(r361236)
@@ -286,7 +286,7 @@ out:
  * This is used by the macro NFSM_DISSECT for tough
  * cases.
  */
-APPLESTATIC void *
+void *
 nfsm_dissct(struct nfsrv_descript *nd, int siz, int how)
 {
 	mbuf_t mp2;
@@ -352,7 +352,7 @@ nfsm_dissct(struct nfsrv_descript *nd, int siz, int ho
  * here than check for offs > 0 for all calls to nfsm_advance.
  * If left == -1, it should be calculated here.
  */
-APPLESTATIC int
+int
 nfsm_advance(struct nfsrv_descript *nd, int offs, int left)
 {
 	int error = 0;
@@ -400,7 +400,7 @@ out:
  * Copy a string into mbuf(s).
  * Return the number of bytes output, including XDR overheads.
  */
-APPLESTATIC int
+int
 nfsm_strtom(struct nfsrv_descript *nd, const char *cp, int siz)
 {
 	mbuf_t m2;
@@ -457,7 +457,7 @@ nfsm_strtom(struct nfsrv_descript *nd, const char *cp,
 /*
  * Called once to initialize data structures...
  */
-APPLESTATIC void
+void
 newnfs_init(void)
 {
 	static int nfs_inited = 0;
@@ -487,7 +487,7 @@ newnfs_init(void)
  * set_true == 1 if there should be an newnfs_true prepended on the file handle.
  * Return the number of bytes output, including XDR overhead.
  */
-APPLESTATIC int
+int
 nfsm_fhtom(struct nfsrv_descript *nd, u_int8_t *fhp, int size, int set_true)
 {
 	u_int32_t *tl;
@@ -530,7 +530,7 @@ nfsm_fhtom(struct nfsrv_descript *nd, u_int8_t *fhp, i
  * The AF_INET family is handled as a special case so that address mbufs
  * don't need to be saved to store "struct in_addr", which is only 4 bytes.
  */
-APPLESTATIC int
+int
 nfsaddr_match(int family, union nethostaddr *haddr, NFSSOCKADDR_T nam)
 {
 	struct sockaddr_in *inetaddr;
@@ -563,7 +563,7 @@ nfsaddr_match(int family, union nethostaddr *haddr, NF
 /*
  * Similar to the above, but takes to NFSSOCKADDR_T args.
  */
-APPLESTATIC int
+int
 nfsaddr2_match(NFSSOCKADDR_T nam1, NFSSOCKADDR_T nam2)
 {
 	struct sockaddr_in *addr1, *addr2;
@@ -601,7 +601,7 @@ nfsaddr2_match(NFSSOCKADDR_T nam1, NFSSOCKADDR_T nam2)
 /*
  * Trim the stuff already dissected off the mbuf list.
  */
-APPLESTATIC void
+void
 newnfs_trimleading(nd)
 	struct nfsrv_descript *nd;
 {
@@ -647,7 +647,7 @@ newnfs_trimleading(nd)
 /*
  * Trim trailing data off the mbuf list being built.
  */
-APPLESTATIC void
+void
 newnfs_trimtrailing(nd, mb, bpos)
 	struct nfsrv_descript *nd;
 	mbuf_t mb;
@@ -666,7 +666,7 @@ newnfs_trimtrailing(nd, mb, bpos)
 /*
  * Dissect a file handle on the client.
  */
-APPLESTATIC int
+int
 nfsm_getfh(struct nfsrv_descript *nd, struct nfsfh **nfhpp)
 {
 	u_int32_t *tl;
@@ -701,7 +701,7 @@ nfsmout:
  * Break down the nfsv4 acl.
  * If the aclp == NULL or won't fit in an acl, just discard the acl info.
  */
-APPLESTATIC int
+int
 nfsrv_dissectacl(struct nfsrv_descript *nd, NFSACL_T *aclp, int *aclerrp,
     int *aclsizep, __unused NFSPROC_T *p)
 {
@@ -767,7 +767,7 @@ nfsmout:
  * Returns EBADRPC for a parsing error, 0 otherwise.
  * If the clearinvalid flag is set, clear the bits not supported.
  */
-APPLESTATIC int
+int
 nfsrv_getattrbits(struct nfsrv_descript *nd, nfsattrbit_t *attrbitp, int *cntp,
     int *retnotsupp)
 {
@@ -813,7 +813,7 @@ nfsmout:
  * and 0 otherwise.
  * Returns EBADRPC if it can't be parsed, 0 otherwise.
  */
-APPLESTATIC int
+int
 nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
     struct nfsvattr *nap, struct nfsfh **nfhpp, fhandle_t *fhp, int fhsize,
     struct nfsv3_pathconf *pc, struct statfs *sbp, struct nfsstatfs *sfp,
@@ -1851,7 +1851,7 @@ nfsmout:
  * and the mp argument indicates to check for a forced dismount, iff not
  * NULL.
  */
-APPLESTATIC int
+int
 nfsv4_lock(struct nfsv4lock *lp, int iwantlock, int *isleptp,
     void *mutex, struct mount *mp)
 {
@@ -1898,7 +1898,7 @@ nfsv4_lock(struct nfsv4lock *lp, int iwantlock, int *i
  * The second argument is set to 1 to indicate the nfslock_usecnt should be
  * incremented, as well.
  */
-APPLESTATIC void
+void
 nfsv4_unlock(struct nfsv4lock *lp, int incref)
 {
 
@@ -1911,7 +1911,7 @@ nfsv4_unlock(struct nfsv4lock *lp, int incref)
 /*
  * Release a reference cnt.
  */
-APPLESTATIC void
+void
 nfsv4_relref(struct nfsv4lock *lp)
 {
 
@@ -1931,7 +1931,7 @@ nfsv4_relref(struct nfsv4lock *lp)
  * If the mp argument is not NULL, check for NFSCL_FORCEDISM() being set and
  * return without getting a refcnt for that case.
  */
-APPLESTATIC void
+void
 nfsv4_getref(struct nfsv4lock *lp, int *isleptp, void *mutex,
     struct mount *mp)
 {
@@ -1961,7 +1961,7 @@ nfsv4_getref(struct nfsv4lock *lp, int *isleptp, void 
  * Get a reference as above, but return failure instead of sleeping if
  * an exclusive lock is held.
  */
-APPLESTATIC int
+int
 nfsv4_getref_nonblock(struct nfsv4lock *lp)
 {
 
@@ -1975,7 +1975,7 @@ nfsv4_getref_nonblock(struct nfsv4lock *lp)
 /*
  * Test for a lock. Return 1 if locked, 0 otherwise.
  */
-APPLESTATIC int
+int
 nfsv4_testlock(struct nfsv4lock *lp)
 {
 
@@ -2003,7 +2003,7 @@ nfsv4_wanted(struct nfsv4lock *lp)
  * Return EBADRPC if there is an mbuf error,
  * 0 otherwise.
  */
-APPLESTATIC int
+int
 nfsrv_mtostr(struct nfsrv_descript *nd, char *str, int siz)
 {
 	char *cp;
@@ -2054,7 +2054,7 @@ out:
 /*
  * Fill in the attributes as marked by the bitmap (V4).
  */
-APPLESTATIC int
+int
 nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
     NFSACL_T *saclp, struct vattr *vap, fhandle_t *fhp, int rderror,
     nfsattrbit_t *attrbitp, struct ucred *cred, NFSPROC_T *p, int isdgram,
@@ -2564,7 +2564,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount
  * Put the attribute bits onto an mbuf list.
  * Return the number of bytes of output generated.
  */
-APPLESTATIC int
+int
 nfsrv_putattrbit(struct nfsrv_descript *nd, nfsattrbit_t *attrbitp)
 {
 	u_int32_t *tl;
@@ -2589,7 +2589,7 @@ nfsrv_putattrbit(struct nfsrv_descript *nd, nfsattrbit
  *       (malloc a larger one, as required)
  * retlenp - pointer to length to be returned
  */
-APPLESTATIC void
+void
 nfsv4_uidtostr(uid_t uid, u_char **cpp, int *retlenp, NFSPROC_T *p)
 {
 	int i;
@@ -2748,7 +2748,7 @@ tryagain:
  * string is made up entirely of digits, just convert the string to
  * a number.
  */
-APPLESTATIC int
+int
 nfsv4_strtouid(struct nfsrv_descript *nd, u_char *str, int len, uid_t *uidp,
     NFSPROC_T *p)
 {
@@ -2851,7 +2851,7 @@ out:
  *       (malloc a larger one, as required)
  * retlenp - pointer to length to be returned
  */
-APPLESTATIC void
+void
 nfsv4_gidtostr(gid_t gid, u_char **cpp, int *retlenp, NFSPROC_T *p)
 {
 	int i;
@@ -2964,7 +2964,7 @@ tryagain:
  * string is made up entirely of digits, just convert the string to
  * a number.
  */
-APPLESTATIC int
+int
 nfsv4_strtogid(struct nfsrv_descript *nd, u_char *str, int len, gid_t *gidp,
     NFSPROC_T *p)
 {
@@ -3090,7 +3090,7 @@ nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len)
 /*
  * Set the port for the nfsuserd.
  */
-APPLESTATIC int
+int
 nfsrv_nfsuserdport(struct nfsuserd_args *nargs, NFSPROC_T *p)
 {
 	struct nfssockreq *rp;
@@ -3173,7 +3173,7 @@ out:
 /*
  * Delete the nfsuserd port.
  */
-APPLESTATIC void
+void
 nfsrv_nfsuserddelport(void)
 {
 
@@ -3260,7 +3260,7 @@ out:
  * This function is called from the nfssvc(2) system call, to update the
  * kernel user/group name list(s) for the V4 owner and ownergroup attributes.
  */
-APPLESTATIC int
+int
 nfssvc_idname(struct nfsd_idargs *nidp)
 {
 	struct nfsusrgrp *nusrp, *usrp, *newusrp;
@@ -3654,7 +3654,7 @@ nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser)
  * running, since it doesn't do any locking.
  * This function is meant to be used when the nfscommon module is unloaded.
  */
-APPLESTATIC void
+void
 nfsrv_cleanusergroup(void)
 {
 	struct nfsrv_lughash *hp, *hp2;
@@ -3701,7 +3701,7 @@ nfsrv_cleanusergroup(void)
  * This function scans a byte string and checks for UTF-8 compliance.
  * It returns 0 if it conforms and NFSERR_INVAL if not.
  */
-APPLESTATIC int
+int
 nfsrv_checkutf8(u_int8_t *cp, int len)
 {
 	u_int32_t val = 0x0;
@@ -3954,7 +3954,7 @@ nfsrv_refstrbigenough(int siz, u_char **cpp, u_char **
 /*
  * Initialize the reply header data structures.
  */
-APPLESTATIC void
+void
 nfsrvd_rephead(struct nfsrv_descript *nd)
 {
 	mbuf_t mreq;
@@ -4019,7 +4019,7 @@ newnfs_sndunlock(int *flagp)
 	NFSUNLOCKSOCK();
 }
 
-APPLESTATIC int
+int
 nfsv4_getipaddr(struct nfsrv_descript *nd, struct sockaddr_storage *sa,
     int *isudp)
 {
@@ -4201,7 +4201,7 @@ nfsv4_seqsess_cacherep(uint32_t slotid, struct nfsslot
 /*
  * Generate the xdr for an NFSv4.1 Sequence Operation.
  */
-APPLESTATIC void
+void
 nfsv4_setsequence(struct nfsmount *nmp, struct nfsrv_descript *nd,
     struct nfsclsession *sep, int dont_replycache)
 {
@@ -4305,7 +4305,7 @@ nfsv4_sequencelookup(struct nfsmount *nmp, struct nfsc
 /*
  * Free a session slot.
  */
-APPLESTATIC void
+void
 nfsv4_freeslot(struct nfsclsession *sep, int slot)
 {
 	uint64_t bitval;

Modified: stable/11/sys/fs/nfs/nfsport.h
==============================================================================
--- stable/11/sys/fs/nfs/nfsport.h	Tue May 19 01:40:45 2020	(r361235)
+++ stable/11/sys/fs/nfs/nfsport.h	Tue May 19 01:43:00 2020	(r361236)
@@ -101,11 +101,6 @@
 #include <rpc/rpc.h>
 #include <rpc/rpcsec_gss.h>
 
-/*
- * For Darwin, these functions should be "static" when built in a kext.
- * (This is always defined as nil otherwise.)
- */
-#define	APPLESTATIC
 #include <ufs/ufs/dir.h>
 #include <ufs/ufs/quota.h>
 #include <ufs/ufs/inode.h>

Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c
==============================================================================
--- stable/11/sys/fs/nfsclient/nfs_clcomsubs.c	Tue May 19 01:40:45 2020	(r361235)
+++ stable/11/sys/fs/nfsclient/nfs_clcomsubs.c	Tue May 19 01:43:00 2020	(r361236)
@@ -127,7 +127,7 @@ static int nfs_bigrequest[NFSV41_NPROCS] = {
  * Start building a request. Mostly just put the first file handle in
  * place.
  */
-APPLESTATIC void
+void
 nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp,
     u_int8_t *nfhp, int fhlen, u_int32_t **opcntpp, struct nfsclsession *sep)
 {
@@ -253,7 +253,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum,
  * copies a uio scatter/gather list to an mbuf chain.
  * NOTE: can ony handle iovcnt == 1
  */
-APPLESTATIC void
+void
 nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *uiop, int siz)
 {
 	char *uiocp;
@@ -336,7 +336,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui
  * Load vnode attributes from the xdr file attributes.
  * Returns EBADRPC if they can't be parsed, 0 otherwise.
  */
-APPLESTATIC int
+int
 nfsm_loadattr(struct nfsrv_descript *nd, struct nfsvattr *nap)
 {
 	struct nfs_fattr *fp;
@@ -402,7 +402,7 @@ nfsmout:
  * This function finds the directory cookie that corresponds to the
  * logical byte offset given.
  */
-APPLESTATIC nfsuint64 *
+nfsuint64 *
 nfscl_getcookie(struct nfsnode *np, off_t off, int add)
 {
 	struct nfsdmap *dp, *dp2;
@@ -454,7 +454,7 @@ nfscl_getcookie(struct nfsnode *np, off_t off, int add
  * the file handle and the file's attributes.
  * For V4, it assumes that Getfh and Getattr Op's results are here.
  */
-APPLESTATIC int
+int
 nfscl_mtofh(struct nfsrv_descript *nd, struct nfsfh **nfhpp,
     struct nfsvattr *nap, int *attrflagp)
 {
@@ -515,7 +515,7 @@ nfsmout:
 /*
  * Put a state Id in the mbuf list.
  */
-APPLESTATIC void
+void
 nfsm_stateidtom(struct nfsrv_descript *nd, nfsv4stateid_t *stateidp, int flag)
 {
 	nfsv4stateid_t *st;
@@ -547,7 +547,7 @@ nfsm_stateidtom(struct nfsrv_descript *nd, nfsv4statei
 /*
  * Initialize the owner/delegation sleep lock.
  */
-APPLESTATIC void
+void
 nfscl_lockinit(struct nfsv4lock *lckp)
 {
 
@@ -559,7 +559,7 @@ nfscl_lockinit(struct nfsv4lock *lckp)
  * Get an exclusive lock. (Not needed for OpenBSD4, since there is only one
  * thread for each posix process in the kernel.)
  */
-APPLESTATIC void
+void
 nfscl_lockexcl(struct nfsv4lock *lckp, void *mutex)
 {
 	int igotlock;
@@ -572,7 +572,7 @@ nfscl_lockexcl(struct nfsv4lock *lckp, void *mutex)
 /*
  * Release an exclusive lock.
  */
-APPLESTATIC void
+void
 nfscl_lockunlock(struct nfsv4lock *lckp)
 {
 
@@ -582,7 +582,7 @@ nfscl_lockunlock(struct nfsv4lock *lckp)
 /*
  * Called to derefernce a lock on a stateid (delegation or open owner).
  */
-APPLESTATIC void
+void
 nfscl_lockderef(struct nfsv4lock *lckp)
 {
 

Modified: stable/11/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/11/sys/fs/nfsclient/nfs_clport.c	Tue May 19 01:40:45 2020	(r361235)
+++ stable/11/sys/fs/nfsclient/nfs_clport.c	Tue May 19 01:43:00 2020	(r361236)
@@ -1196,7 +1196,7 @@ nfscl_checksattr(struct vattr *vap, struct nfsvattr *n
  * error should only be returned for the Open, Create and Setattr Ops.
  * As such, most calls can just pass in 0 for those arguments.
  */
-APPLESTATIC int
+int
 nfscl_maperr(struct thread *td, int error, uid_t uid, gid_t gid)
 {
 	struct proc *p;

Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/11/sys/fs/nfsclient/nfs_clrpcops.c	Tue May 19 01:40:45 2020	(r361235)
+++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c	Tue May 19 01:43:00 2020	(r361236)
@@ -151,7 +151,7 @@ static int nfsrpc_layoutgetres(struct nfsmount *, vnod
 /*
  * nfs null call from vfs.
  */
-APPLESTATIC int
+int
 nfsrpc_null(vnode_t vp, struct ucred *cred, NFSPROC_T *p)
 {
 	int error;
@@ -170,7 +170,7 @@ nfsrpc_null(vnode_t vp, struct ucred *cred, NFSPROC_T 
  * For nfs version 3 and 4, use the access rpc to check accessibility. If file
  * modes are changed on the server, accesses might still fail later.
  */
-APPLESTATIC int
+int
 nfsrpc_access(vnode_t vp, int acmode, struct ucred *cred,
     NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp)
 {
@@ -213,7 +213,7 @@ nfsrpc_access(vnode_t vp, int acmode, struct ucred *cr
 /*
  * The actual rpc, separated out for Darwin.
  */
-APPLESTATIC int
+int
 nfsrpc_accessrpc(vnode_t vp, u_int32_t mode, struct ucred *cred,
     NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, u_int32_t *rmodep,
     void *stuff)
@@ -274,7 +274,7 @@ nfsmout:
 /*
  * nfs open rpc
  */
-APPLESTATIC int
+int
 nfsrpc_open(vnode_t vp, int amode, struct ucred *cred, NFSPROC_T *p)
 {
 	struct nfsclopen *op;
@@ -406,7 +406,7 @@ else printf(" fhl=0\n");
 /*
  * the actual open rpc
  */
-APPLESTATIC int
+int
 nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen,
     u_int8_t *newfhp, int newfhlen, u_int32_t mode, struct nfsclopen *op,
     u_int8_t *name, int namelen, struct nfscldeleg **dpp,
@@ -609,7 +609,7 @@ nfsmout:
 /*
  * open downgrade rpc
  */
-APPLESTATIC int
+int
 nfsrpc_opendowngrade(vnode_t vp, u_int32_t mode, struct nfsclopen *op,
     struct ucred *cred, NFSPROC_T *p)
 {
@@ -652,7 +652,7 @@ nfsmout:
 /*
  * V4 Close operation.
  */
-APPLESTATIC int
+int
 nfsrpc_close(vnode_t vp, int doclose, NFSPROC_T *p)
 {
 	struct nfsclclient *clp;
@@ -674,7 +674,7 @@ nfsrpc_close(vnode_t vp, int doclose, NFSPROC_T *p)
 /*
  * Close the open.
  */
-APPLESTATIC void
+void
 nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p)
 {
 	struct nfsrv_descript nfsd, *nd = &nfsd;
@@ -771,7 +771,7 @@ nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen 
 /*
  * The actual Close RPC.
  */
-APPLESTATIC int
+int
 nfsrpc_closerpc(struct nfsrv_descript *nd, struct nfsmount *nmp,
     struct nfsclopen *op, struct ucred *cred, NFSPROC_T *p,
     int syscred)
@@ -810,7 +810,7 @@ nfsmout:
 /*
  * V4 Open Confirm RPC.
  */
-APPLESTATIC int
+int
 nfsrpc_openconfirm(vnode_t vp, u_int8_t *nfhp, int fhlen,
     struct nfsclopen *op, struct ucred *cred, NFSPROC_T *p)
 {
@@ -852,7 +852,7 @@ nfsmout:
  * Do the setclientid and setclientid confirm RPCs. Called from nfs_statfs()
  * when a mount has just occurred and when the server replies NFSERR_EXPIRED.
  */
-APPLESTATIC int
+int
 nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim,
     struct ucred *cred, NFSPROC_T *p)
 {
@@ -1052,7 +1052,7 @@ nfsmout:
 /*
  * nfs getattr call.
  */
-APPLESTATIC int
+int
 nfsrpc_getattr(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
     struct nfsvattr *nap, void *stuff)
 {
@@ -1079,7 +1079,7 @@ nfsrpc_getattr(vnode_t vp, struct ucred *cred, NFSPROC
 /*
  * nfs getattr call with non-vnode arguemnts.
  */
-APPLESTATIC int
+int
 nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, u_int64_t *xidp,
     uint32_t *leasep)
@@ -1119,7 +1119,7 @@ nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp
 /*
  * Do an nfs setattr operation.
  */
-APPLESTATIC int
+int
 nfsrpc_setattr(vnode_t vp, struct vattr *vap, NFSACL_T *aclp,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *rnap, int *attrflagp,
     void *stuff)
@@ -1246,7 +1246,7 @@ nfsrpc_setattrrpc(vnode_t vp, struct vattr *vap,
 /*
  * nfs lookup rpc
  */
-APPLESTATIC int
+int
 nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred,
     NFSPROC_T *p, struct nfsvattr *dnap, struct nfsvattr *nap,
     struct nfsfh **nfhpp, int *attrflagp, int *dattrflagp, void *stuff)
@@ -1349,7 +1349,7 @@ nfsmout:
 /*
  * Do a readlink rpc.
  */
-APPLESTATIC int
+int
 nfsrpc_readlink(vnode_t vp, struct uio *uiop, struct ucred *cred,
     NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff)
 {
@@ -1405,7 +1405,7 @@ nfsmout:
 /*
  * Read operation.
  */
-APPLESTATIC int
+int
 nfsrpc_read(vnode_t vp, struct uio *uiop, struct ucred *cred,
     NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff)
 {
@@ -1563,7 +1563,7 @@ nfsmout:
  * the recovery thread could get stuck waiting for the buffer and recovery
  * will then deadlock.
  */
-APPLESTATIC int
+int
 nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp,
     void *stuff, int called_from_strategy)
@@ -1825,7 +1825,7 @@ nfsmout:
  * For NFS v2 this is a kludge. Use a create rpc but with the IFMT bits of the
  * mode set to specify the file type and the size field for rdev.
  */
-APPLESTATIC int
+int
 nfsrpc_mknod(vnode_t dvp, char *name, int namelen, struct vattr *vap,
     u_int32_t rdev, enum vtype vtyp, struct ucred *cred, NFSPROC_T *p,
     struct nfsvattr *dnap, struct nfsvattr *nnap, struct nfsfh **nfhpp,
@@ -1905,7 +1905,7 @@ nfsmout:
  * Mostly just call the approriate routine. (I separated out v4, so that
  * error recovery wouldn't be as difficult.)
  */
-APPLESTATIC int
+int
 nfsrpc_create(vnode_t dvp, char *name, int namelen, struct vattr *vap,
     nfsquad_t cverf, int fmode, struct ucred *cred, NFSPROC_T *p,
     struct nfsvattr *dnap, struct nfsvattr *nnap, struct nfsfh **nfhpp,
@@ -2272,7 +2272,7 @@ nfsmout:
 /*
  * Nfs remove rpc
  */
-APPLESTATIC int
+int
 nfsrpc_remove(vnode_t dvp, char *name, int namelen, vnode_t vp,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *dnap, int *dattrflagp,
     void *dstuff)
@@ -2349,7 +2349,7 @@ nfsmout:
 /*
  * Do an nfs rename rpc.
  */
-APPLESTATIC int
+int
 nfsrpc_rename(vnode_t fdvp, vnode_t fvp, char *fnameptr, int fnamelen,
     vnode_t tdvp, vnode_t tvp, char *tnameptr, int tnamelen, struct ucred *cred,
     NFSPROC_T *p, struct nfsvattr *fnap, struct nfsvattr *tnap,
@@ -2507,7 +2507,7 @@ nfsmout:
 /*
  * nfs hard link create rpc
  */
-APPLESTATIC int
+int
 nfsrpc_link(vnode_t dvp, vnode_t vp, char *name, int namelen,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *dnap,
     struct nfsvattr *nap, int *attrflagp, int *dattrflagp, void *dstuff)
@@ -2570,7 +2570,7 @@ nfsmout:
 /*
  * nfs symbolic link create rpc
  */
-APPLESTATIC int
+int
 nfsrpc_symlink(vnode_t dvp, char *name, int namelen, char *target,
     struct vattr *vap, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *dnap,
     struct nfsvattr *nnap, struct nfsfh **nfhpp, int *attrflagp,
@@ -2631,7 +2631,7 @@ nfsrpc_symlink(vnode_t dvp, char *name, int namelen, c
 /*
  * nfs make dir rpc
  */
-APPLESTATIC int
+int
 nfsrpc_mkdir(vnode_t dvp, char *name, int namelen, struct vattr *vap,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *dnap,
     struct nfsvattr *nnap, struct nfsfh **nfhpp, int *attrflagp,
@@ -2713,7 +2713,7 @@ nfsmout:
 /*
  * nfs remove directory call
  */
-APPLESTATIC int
+int
 nfsrpc_rmdir(vnode_t dvp, char *name, int namelen, struct ucred *cred,
     NFSPROC_T *p, struct nfsvattr *dnap, int *dattrflagp, void *dstuff)
 {
@@ -2769,7 +2769,7 @@ nfsrpc_rmdir(vnode_t dvp, char *name, int namelen, str
  * and returns the one for the next entry after this directory block in
  * there, as well.
  */
-APPLESTATIC int
+int
 nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp,
     int *eofp, void *stuff)
@@ -3201,7 +3201,7 @@ nfsmout:
  * (Also used for NFS V4 when mount flag set.)
  * (ditto above w.r.t. multiple of DIRBLKSIZ, etc.)
  */
-APPLESTATIC int
+int
 nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp,
     int *eofp, void *stuff)
@@ -3692,7 +3692,7 @@ nfsmout:
 /*
  * Nfs commit rpc
  */
-APPLESTATIC int
+int
 nfsrpc_commit(vnode_t vp, u_quad_t offset, int cnt, struct ucred *cred,
     NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff)
 {
@@ -3743,7 +3743,7 @@ nfsmout:
  * NFS byte range lock rpc.
  * (Mostly just calls one of the three lower level RPC routines.)
  */
-APPLESTATIC int
+int
 nfsrpc_advlock(vnode_t vp, off_t size, int op, struct flock *fl,
     int reclaim, struct ucred *cred, NFSPROC_T *p, void *id, int flags)
 {
@@ -3910,7 +3910,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, int op, struct 
 /*
  * The lower level routine for the LockT case.
  */
-APPLESTATIC int
+int
 nfsrpc_lockt(struct nfsrv_descript *nd, vnode_t vp,
     struct nfsclclient *clp, u_int64_t off, u_int64_t len, struct flock *fl,
     struct ucred *cred, NFSPROC_T *p, void *id, int flags)
@@ -4035,7 +4035,7 @@ nfsmout:
 /*
  * The actual Lock RPC.
  */
-APPLESTATIC int
+int
 nfsrpc_lock(struct nfsrv_descript *nd, struct nfsmount *nmp, vnode_t vp,
     u_int8_t *nfhp, int fhlen, struct nfscllockowner *lp, int newone,
     int reclaim, u_int64_t off, u_int64_t len, short type, struct ucred *cred,
@@ -4124,7 +4124,7 @@ nfsmout:
  * nfs statfs rpc
  * (always called with the vp for the mount point)
  */
-APPLESTATIC int
+int
 nfsrpc_statfs(vnode_t vp, struct nfsstatfs *sbp, struct nfsfsinfo *fsp,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp,
     void *stuff)
@@ -4203,7 +4203,7 @@ nfsmout:
 /*
  * nfs pathconf rpc
  */
-APPLESTATIC int
+int
 nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc,
     struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp,
     void *stuff)
@@ -4264,7 +4264,7 @@ nfsmout:
 /*
  * nfs version 3 fsinfo rpc call
  */
-APPLESTATIC int
+int
 nfsrpc_fsinfo(vnode_t vp, struct nfsfsinfo *fsp, struct ucred *cred,
     NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff)
 {
@@ -4303,7 +4303,7 @@ nfsmout:
 /*
  * This function performs the Renew RPC.
  */
-APPLESTATIC int
+int
 nfsrpc_renew(struct nfsclclient *clp, struct nfsclds *dsp, struct ucred *cred,
     NFSPROC_T *p)
 {
@@ -4353,7 +4353,7 @@ nfsrpc_renew(struct nfsclclient *clp, struct nfsclds *
 /*
  * This function performs the Releaselockowner RPC.
  */
-APPLESTATIC int
+int
 nfsrpc_rellockown(struct nfsmount *nmp, struct nfscllockowner *lp,
     uint8_t *fh, int fhlen, struct ucred *cred, NFSPROC_T *p)
 {
@@ -4392,7 +4392,7 @@ nfsrpc_rellockown(struct nfsmount *nmp, struct nfscllo
 /*
  * This function performs the Compound to get the mount pt FH.
  */
-APPLESTATIC int
+int
 nfsrpc_getdirpath(struct nfsmount *nmp, u_char *dirpath, struct ucred *cred,
     NFSPROC_T *p)
 {
@@ -4460,7 +4460,7 @@ nfsmout:
 /*
  * This function performs the Delegreturn RPC.
  */
-APPLESTATIC int
+int
 nfsrpc_delegreturn(struct nfscldeleg *dp, struct ucred *cred,
     struct nfsmount *nmp, NFSPROC_T *p, int syscred)
 {
@@ -4493,7 +4493,7 @@ nfsrpc_delegreturn(struct nfscldeleg *dp, struct ucred
 /*
  * nfs getacl call.
  */
-APPLESTATIC int
+int
 nfsrpc_getacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
     struct acl *aclp, void *stuff)
 {
@@ -4523,7 +4523,7 @@ nfsrpc_getacl(vnode_t vp, struct ucred *cred, NFSPROC_
 /*
  * nfs setacl call.
  */
-APPLESTATIC int
+int
 nfsrpc_setacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
     struct acl *aclp, void *stuff)
 {

Modified: stable/11/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/11/sys/fs/nfsclient/nfs_clstate.c	Tue May 19 01:40:45 2020	(r361235)
+++ stable/11/sys/fs/nfsclient/nfs_clstate.c	Tue May 19 01:43:00 2020	(r361236)
@@ -206,7 +206,7 @@ static short *nfscl_cberrmap[] = {
  * Called for an open operation.
  * If the nfhp argument is NULL, just get an openowner.
  */
-APPLESTATIC int
+int
 nfscl_open(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t amode, int usedeleg,
     struct ucred *cred, NFSPROC_T *p, struct nfsclowner **owpp,
     struct nfsclopen **opp, int *newonep, int *retp, int lockit)
@@ -422,7 +422,7 @@ nfscl_newopen(struct nfsclclient *clp, struct nfscldel
 /*
  * Called to find/add a delegation to a client.
  */
-APPLESTATIC int
+int
 nfscl_deleg(mount_t mp, struct nfsclclient *clp, u_int8_t *nfhp,
     int fhlen, struct ucred *cred, NFSPROC_T *p, struct nfscldeleg **dpp)
 {
@@ -493,7 +493,7 @@ nfscl_finddeleg(struct nfsclclient *clp, u_int8_t *fhp
  * found, return either a lockowner stateid or the open stateid.
  * If no Open is found, just return error and the special stateid of all zeros.
  */
-APPLESTATIC int
+int
 nfscl_getstateid(vnode_t vp, u_int8_t *nfhp, int fhlen, u_int32_t mode,
     int fords, struct ucred *cred, NFSPROC_T *p, nfsv4stateid_t *stateidp,
     void **lckpp)
@@ -717,7 +717,7 @@ nfscl_getopen(struct nfsclownerhead *ohp, u_int8_t *nf
  * Release use of an open owner. Called when open operations are done
  * with the open owner.
  */
-APPLESTATIC void
+void
 nfscl_ownerrelease(struct nfsmount *nmp, struct nfsclowner *owp,
     __unused int error, __unused int candelete, int unlocked)
 {
@@ -738,7 +738,7 @@ nfscl_ownerrelease(struct nfsmount *nmp, struct nfsclo
 /*
  * Release use of an open structure under an open owner.
  */
-APPLESTATIC void
+void
 nfscl_openrelease(struct nfsmount *nmp, struct nfsclopen *op, int error,
     int candelete)
 {
@@ -772,7 +772,7 @@ nfscl_openrelease(struct nfsmount *nmp, struct nfsclop
  * thread if this creates a new clp.
  * It always clpp with a reference count on it, unless returning an error.
  */
-APPLESTATIC int
+int
 nfscl_getcl(struct mount *mp, struct ucred *cred, NFSPROC_T *p,
     int start_renewthread, struct nfsclclient **clpp)
 {
@@ -935,7 +935,7 @@ nfscl_getcl(struct mount *mp, struct ucred *cred, NFSP
 /*
  * Get a reference to a clientid and return it, if valid.
  */
-APPLESTATIC struct nfsclclient *
+struct nfsclclient *
 nfscl_findcl(struct nfsmount *nmp)
 {
 	struct nfsclclient *clp;
@@ -962,7 +962,7 @@ nfscl_clrelease(struct nfsclclient *clp)
 /*
  * External call for nfscl_clrelease.
  */
-APPLESTATIC void
+void
 nfscl_clientrelease(struct nfsclclient *clp)
 {
 
@@ -977,7 +977,7 @@ nfscl_clientrelease(struct nfsclclient *clp)
 /*
  * Called when wanting to lock a byte region.
  */
-APPLESTATIC int
+int
 nfscl_getbytelock(vnode_t vp, u_int64_t off, u_int64_t len,
     short type, struct ucred *cred, NFSPROC_T *p, struct nfsclclient *rclp,
     int recovery, void *id, int flags, u_int8_t *rownp, u_int8_t *ropenownp,
@@ -1177,7 +1177,7 @@ nfscl_getbytelock(vnode_t vp, u_int64_t off, u_int64_t
 /*
  * Called to unlock a byte range, for LockU.
  */
-APPLESTATIC int
+int
 nfscl_relbytelock(vnode_t vp, u_int64_t off, u_int64_t len,
     __unused struct ucred *cred, NFSPROC_T *p, int callcnt,
     struct nfsclclient *clp, void *id, int flags,
@@ -1289,7 +1289,7 @@ nfscl_relbytelock(vnode_t vp, u_int64_t off, u_int64_t
 /*
  * Release all lockowners marked in progess for this process and file.
  */
-APPLESTATIC void
+void
 nfscl_releasealllocks(struct nfsclclient *clp, vnode_t vp, NFSPROC_T *p,
     void *id, int flags)
 {
@@ -1327,7 +1327,7 @@ nfscl_releasealllocks(struct nfsclclient *clp, vnode_t
  * is required before a LockU.
  * If in doubt, return 1, so the flush will occur.
  */
-APPLESTATIC int
+int
 nfscl_checkwritelocked(vnode_t vp, struct flock *fl,
     struct ucred *cred, NFSPROC_T *p, void *id, int flags)
 {
@@ -1433,7 +1433,7 @@ nfscl_checkwritelocked(vnode_t vp, struct flock *fl,
 /*
  * Release a byte range lock owner structure.
  */
-APPLESTATIC void
+void
 nfscl_lockrelease(struct nfscllockowner *lp, int error, int candelete)
 {
 	struct nfsclclient *clp;
@@ -1454,7 +1454,7 @@ nfscl_lockrelease(struct nfscllockowner *lp, int error
 /*
  * Free up an open structure and any associated byte range lock structures.
  */
-APPLESTATIC void
+void
 nfscl_freeopen(struct nfsclopen *op, int local)
 {
 
@@ -1551,7 +1551,7 @@ nfscl_freeopenowner(struct nfsclowner *owp, int local)
 /*
  * Free up a byte range lock owner structure.
  */
-APPLESTATIC void
+void
 nfscl_freelockowner(struct nfscllockowner *lp, int local)
 {
 	struct nfscllock *lop, *nlop;
@@ -1570,7 +1570,7 @@ nfscl_freelockowner(struct nfscllockowner *lp, int loc
 /*
  * Free up a byte range lock structure.
  */
-APPLESTATIC void
+void
 nfscl_freelock(struct nfscllock *lop, int local)
 {
 
@@ -1871,7 +1871,7 @@ static int	fake_global;	/* Used to force visibility of
 /*
  * Called from nfs umount to free up the clientid.
  */
-APPLESTATIC void
+void
 nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p)
 {
 	struct nfsclclient *clp;
@@ -2281,7 +2281,7 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *c
  * XXX Someday it should post a signal to the process(es) that hold the

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005190143.04J1h13M070549>