svn commit: r360960 - in head/sys/fs: nfs nfsclient nfsserver
Ryan Moeller
freqlabs at FreeBSD.org
Tue May 12 13:23:27 UTC 2020
Author: freqlabs
Date: Tue May 12 13:23:25 2020
New Revision: 360960
URL: https://svnweb.freebsd.org/changeset/base/360960
Log:
nfs: Remove APPLESTATIC macro
It is no longer useful.
Reviewed by: rmacklem
Approved by: mav (mentor)
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D24811
Modified:
head/sys/fs/nfs/nfs_commonacl.c
head/sys/fs/nfs/nfs_commonsubs.c
head/sys/fs/nfs/nfsport.h
head/sys/fs/nfsclient/nfs_clcomsubs.c
head/sys/fs/nfsclient/nfs_clport.c
head/sys/fs/nfsclient/nfs_clrpcops.c
head/sys/fs/nfsclient/nfs_clstate.c
head/sys/fs/nfsserver/nfs_nfsdcache.c
head/sys/fs/nfsserver/nfs_nfsdserv.c
head/sys/fs/nfsserver/nfs_nfsdsocket.c
head/sys/fs/nfsserver/nfs_nfsdstate.c
head/sys/fs/nfsserver/nfs_nfsdsubs.c
Modified: head/sys/fs/nfs/nfs_commonacl.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonacl.c Tue May 12 12:29:39 2020 (r360959)
+++ head/sys/fs/nfs/nfs_commonacl.c Tue May 12 13:23:25 2020 (r360960)
@@ -40,7 +40,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)
{
@@ -388,7 +388,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)
{
@@ -451,7 +451,7 @@ nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *ac
* 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: head/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonsubs.c Tue May 12 12:29:39 2020 (r360959)
+++ head/sys/fs/nfs/nfs_commonsubs.c Tue May 12 13:23:25 2020 (r360960)
@@ -314,7 +314,7 @@ static int nfs_bigrequest[NFSV42_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,
int vers, int minorvers)
@@ -453,7 +453,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum,
/*
* 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;
@@ -689,7 +689,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)
{
struct mbuf *mp2;
@@ -755,7 +755,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;
@@ -803,7 +803,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)
{
struct mbuf *m2;
@@ -860,7 +860,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;
@@ -890,7 +890,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;
@@ -933,7 +933,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)
{
#ifdef INET
@@ -970,7 +970,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;
@@ -1007,7 +1007,7 @@ nfsaddr2_match(NFSSOCKADDR_T nam1, NFSSOCKADDR_T nam2)
/*
* Trim trailing data off the mbuf list being built.
*/
-APPLESTATIC void
+void
newnfs_trimtrailing(nd, mb, bpos)
struct nfsrv_descript *nd;
struct mbuf *mb;
@@ -1026,7 +1026,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;
@@ -1061,7 +1061,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)
{
@@ -1127,7 +1127,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)
{
@@ -1173,7 +1173,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,
@@ -2217,7 +2217,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)
{
@@ -2264,7 +2264,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)
{
@@ -2277,7 +2277,7 @@ nfsv4_unlock(struct nfsv4lock *lp, int incref)
/*
* Release a reference cnt.
*/
-APPLESTATIC void
+void
nfsv4_relref(struct nfsv4lock *lp)
{
@@ -2297,7 +2297,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)
{
@@ -2327,7 +2327,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)
{
@@ -2341,7 +2341,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)
{
@@ -2369,7 +2369,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;
@@ -2420,7 +2420,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,
@@ -3000,7 +3000,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;
@@ -3025,7 +3025,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)
{
int i;
@@ -3182,7 +3182,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)
{
int i;
@@ -3284,7 +3284,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)
{
int i;
@@ -3396,7 +3396,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)
{
int i;
@@ -3521,7 +3521,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;
@@ -3604,7 +3604,7 @@ out:
/*
* Delete the nfsuserd port.
*/
-APPLESTATIC void
+void
nfsrv_nfsuserddelport(void)
{
@@ -3691,7 +3691,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;
@@ -4084,7 +4084,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;
@@ -4131,7 +4131,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;
@@ -4384,7 +4384,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)
{
struct mbuf *mreq;
@@ -4449,7 +4449,7 @@ newnfs_sndunlock(int *flagp)
NFSUNLOCKSOCK();
}
-APPLESTATIC int
+int
nfsv4_getipaddr(struct nfsrv_descript *nd, struct sockaddr_in *sin,
struct sockaddr_in6 *sin6, sa_family_t *saf, int *isudp)
{
@@ -4630,7 +4630,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)
{
@@ -4738,7 +4738,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: head/sys/fs/nfs/nfsport.h
==============================================================================
--- head/sys/fs/nfs/nfsport.h Tue May 12 12:29:39 2020 (r360959)
+++ head/sys/fs/nfs/nfsport.h Tue May 12 13:23:25 2020 (r360960)
@@ -103,11 +103,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: head/sys/fs/nfsclient/nfs_clcomsubs.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clcomsubs.c Tue May 12 12:29:39 2020 (r360959)
+++ head/sys/fs/nfsclient/nfs_clcomsubs.c Tue May 12 13:23:25 2020 (r360960)
@@ -55,7 +55,7 @@ static nfsuint64 nfs_nullcookie = {{ 0, 0 }};
* 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;
@@ -206,7 +206,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu
* 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;
@@ -273,7 +273,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;
@@ -325,7 +325,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)
{
@@ -386,7 +386,7 @@ nfsmout:
/*
* Initialize the owner/delegation sleep lock.
*/
-APPLESTATIC void
+void
nfscl_lockinit(struct nfsv4lock *lckp)
{
@@ -398,7 +398,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;
@@ -411,7 +411,7 @@ nfscl_lockexcl(struct nfsv4lock *lckp, void *mutex)
/*
* Release an exclusive lock.
*/
-APPLESTATIC void
+void
nfscl_lockunlock(struct nfsv4lock *lckp)
{
@@ -421,7 +421,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: head/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clport.c Tue May 12 12:29:39 2020 (r360959)
+++ head/sys/fs/nfsclient/nfs_clport.c Tue May 12 13:23:25 2020 (r360960)
@@ -1108,7 +1108,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: head/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clrpcops.c Tue May 12 12:29:39 2020 (r360959)
+++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue May 12 13:23:25 2020 (r360960)
@@ -226,7 +226,7 @@ int nfs_pnfsio(task_fn_t *, void *);
/*
* nfs null call from vfs.
*/
-APPLESTATIC int
+int
nfsrpc_null(vnode_t vp, struct ucred *cred, NFSPROC_T *p)
{
int error;
@@ -245,7 +245,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)
{
@@ -288,7 +288,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)
@@ -349,7 +349,7 @@ nfsmout:
/*
* nfs open rpc
*/
-APPLESTATIC int
+int
nfsrpc_open(vnode_t vp, int amode, struct ucred *cred, NFSPROC_T *p)
{
struct nfsclopen *op;
@@ -481,7 +481,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,
@@ -684,7 +684,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)
{
@@ -727,7 +727,7 @@ nfsmout:
/*
* V4 Close operation.
*/
-APPLESTATIC int
+int
nfsrpc_close(vnode_t vp, int doclose, NFSPROC_T *p)
{
struct nfsclclient *clp;
@@ -749,7 +749,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;
@@ -846,7 +846,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)
@@ -885,7 +885,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)
{
@@ -928,7 +928,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,
bool *retokp, struct ucred *cred, NFSPROC_T *p)
{
@@ -1184,7 +1184,7 @@ nfsmout:
/*
* nfs getattr call.
*/
-APPLESTATIC int
+int
nfsrpc_getattr(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
struct nfsvattr *nap, void *stuff)
{
@@ -1211,7 +1211,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)
@@ -1251,7 +1251,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)
@@ -1378,7 +1378,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)
@@ -1481,7 +1481,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)
{
@@ -1537,7 +1537,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)
{
@@ -1695,7 +1695,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)
@@ -1960,7 +1960,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,
@@ -2040,7 +2040,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,
@@ -2407,7 +2407,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)
@@ -2484,7 +2484,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,
@@ -2642,7 +2642,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)
@@ -2705,7 +2705,7 @@ nfsmout:
/*
* nfs symbolic link create rpc
*/
-APPLESTATIC int
+int
nfsrpc_symlink(vnode_t dvp, char *name, int namelen, const char *target,
struct vattr *vap, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *dnap,
struct nfsvattr *nnap, struct nfsfh **nfhpp, int *attrflagp,
@@ -2766,7 +2766,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,
@@ -2848,7 +2848,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)
{
@@ -2904,7 +2904,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)
@@ -3351,7 +3351,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)
@@ -3860,7 +3860,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)
{
@@ -3911,7 +3911,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)
{
@@ -4078,7 +4078,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)
@@ -4203,7 +4203,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,
@@ -4292,7 +4292,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)
@@ -4371,7 +4371,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)
@@ -4432,7 +4432,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)
{
@@ -4471,7 +4471,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)
{
@@ -4525,7 +4525,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)
{
@@ -4564,7 +4564,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)
{
@@ -4633,7 +4633,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)
{
@@ -4666,7 +4666,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)
{
@@ -4696,7 +4696,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)
{
@@ -6829,7 +6829,7 @@ nfsio_commitds(vnode_t vp, uint64_t offset, int cnt, s
/*
* NFS Advise rpc
*/
-APPLESTATIC int
+int
nfsrpc_advise(vnode_t vp, off_t offset, uint64_t cnt, int advise,
struct ucred *cred, NFSPROC_T *p)
{
@@ -6970,7 +6970,7 @@ nfsio_adviseds(vnode_t vp, uint64_t offset, int cnt, i
/*
* Do the Allocate operation, retrying for recovery.
*/
-APPLESTATIC int
+int
nfsrpc_allocate(vnode_t vp, off_t off, off_t len, struct nfsvattr *nap,
int *attrflagp, struct ucred *cred, NFSPROC_T *p, void *stuff)
{
@@ -8077,7 +8077,7 @@ out:
/*
* nfs copy_file_range operation.
*/
-APPLESTATIC int
+int
nfsrpc_copy_file_range(vnode_t invp, off_t *inoffp, vnode_t outvp,
off_t *outoffp, size_t *lenp, unsigned int flags, int *inattrflagp,
struct nfsvattr *innap, int *outattrflagp, struct nfsvattr *outnap,
@@ -8271,7 +8271,7 @@ nfsmout:
/*
* Seek operation.
*/
-APPLESTATIC int
+int
nfsrpc_seek(vnode_t vp, off_t *offp, bool *eofp, int content,
struct ucred *cred, struct nfsvattr *nap, int *attrflagp)
{
@@ -8365,7 +8365,7 @@ nfsmout:
/*
* The getextattr RPC.
*/
-APPLESTATIC int
+int
nfsrpc_getextattr(vnode_t vp, const char *name, struct uio *uiop, ssize_t *lenp,
struct nfsvattr *nap, int *attrflagp, struct ucred *cred, NFSPROC_T *p)
{
@@ -8436,7 +8436,7 @@ nfsmout:
/*
* The setextattr RPC.
*/
-APPLESTATIC int
+int
nfsrpc_setextattr(vnode_t vp, const char *name, struct uio *uiop,
struct nfsvattr *nap, int *attrflagp, struct ucred *cred, NFSPROC_T *p)
{
@@ -8484,7 +8484,7 @@ nfsmout:
/*
* The removeextattr RPC.
*/
-APPLESTATIC int
+int
nfsrpc_rmextattr(vnode_t vp, const char *name, struct nfsvattr *nap,
int *attrflagp, struct ucred *cred, NFSPROC_T *p)
{
@@ -8522,7 +8522,7 @@ nfsmout:
/*
* The listextattr RPC.
*/
-APPLESTATIC int
+int
nfsrpc_listextattr(vnode_t vp, uint64_t *cookiep, struct uio *uiop,
size_t *lenp, bool *eofp, struct nfsvattr *nap, int *attrflagp,
struct ucred *cred, NFSPROC_T *p)
Modified: head/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clstate.c Tue May 12 12:29:39 2020 (r360959)
+++ head/sys/fs/nfsclient/nfs_clstate.c Tue May 12 13:23:25 2020 (r360960)
@@ -209,7 +209,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)
@@ -425,7 +425,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)
{
@@ -496,7 +496,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)
@@ -720,7 +720,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)
{
@@ -741,7 +741,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)
{
@@ -775,7 +775,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)
{
@@ -938,7 +938,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;
@@ -965,7 +965,7 @@ nfscl_clrelease(struct nfsclclient *clp)
/*
* External call for nfscl_clrelease.
*/
-APPLESTATIC void
+void
nfscl_clientrelease(struct nfsclclient *clp)
{
@@ -980,7 +980,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,
@@ -1180,7 +1180,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,
@@ -1292,7 +1292,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)
{
@@ -1330,7 +1330,7 @@ nfscl_releasealllocks(struct nfsclclient *clp, vnode_t
* is required before a LockU.
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-head
mailing list