From 6e4709be52367a1bfb260ce76fa3ab5a65194614 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 5 Jan 2023 17:42:48 +0100 Subject: vfs/nfs: Revert white space changes --- freebsd/sys/fs/nfsclient/nfs.h | 3 +- freebsd/sys/fs/nfsclient/nfs_clbio.c | 3 +- freebsd/sys/fs/nfsclient/nfs_clkrpc.c | 1 + freebsd/sys/fs/nfsclient/nfs_clport.c | 1 + freebsd/sys/fs/nfsclient/nfs_clrpcops.c | 1 + freebsd/sys/fs/nfsclient/nfs_clstate.c | 1 + freebsd/sys/fs/nfsclient/nfs_clsubs.c | 1 + freebsd/sys/fs/nfsclient/nfs_clvfsops.c | 1 + freebsd/sys/fs/nfsclient/nfs_clvnops.c | 51 +++++++++++++++++---------------- 9 files changed, 35 insertions(+), 28 deletions(-) (limited to 'freebsd/sys/fs/nfsclient') diff --git a/freebsd/sys/fs/nfsclient/nfs.h b/freebsd/sys/fs/nfsclient/nfs.h index f76a60a7..ce1747a2 100644 --- a/freebsd/sys/fs/nfsclient/nfs.h +++ b/freebsd/sys/fs/nfsclient/nfs.h @@ -96,8 +96,7 @@ void ncl_doio_directwrite(struct buf *); int ncl_bioread(struct vnode *, struct uio *, int, struct ucred *); int ncl_biowrite(struct vnode *, struct uio *, int, struct ucred *); int ncl_vinvalbuf(struct vnode *, int, struct thread *, int); -int ncl_asyncio(struct - nfsmount *, struct buf *, struct ucred *, +int ncl_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *); int ncl_doio(struct vnode *, struct buf *, struct ucred *, struct thread *, int); diff --git a/freebsd/sys/fs/nfsclient/nfs_clbio.c b/freebsd/sys/fs/nfsclient/nfs_clbio.c index cd157db6..9467b6ae 100644 --- a/freebsd/sys/fs/nfsclient/nfs_clbio.c +++ b/freebsd/sys/fs/nfsclient/nfs_clbio.c @@ -1695,7 +1695,7 @@ ncl_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td, PROC_UNLOCK(p); #else /* __rtems__ */ panic("nfsclient: text file modification: want to killproc"); -#endif /* _-rtems__ */ +#endif /* __rtems__ */ } else NFSUNLOCKNODE(np); } @@ -1923,3 +1923,4 @@ ncl_meta_setsize(struct vnode *vp, struct thread *td, u_quad_t nsize) } return(error); } + diff --git a/freebsd/sys/fs/nfsclient/nfs_clkrpc.c b/freebsd/sys/fs/nfsclient/nfs_clkrpc.c index c3260ccf..4974e998 100644 --- a/freebsd/sys/fs/nfsclient/nfs_clkrpc.c +++ b/freebsd/sys/fs/nfsclient/nfs_clkrpc.c @@ -298,3 +298,4 @@ nfsrvd_cbinit(int terminating) NFSD_LOCK(); } } + diff --git a/freebsd/sys/fs/nfsclient/nfs_clport.c b/freebsd/sys/fs/nfsclient/nfs_clport.c index ed307700..5358170a 100644 --- a/freebsd/sys/fs/nfsclient/nfs_clport.c +++ b/freebsd/sys/fs/nfsclient/nfs_clport.c @@ -1452,3 +1452,4 @@ MODULE_DEPEND(nfscl, nfscommon, 1, 1, 1); MODULE_DEPEND(nfscl, krpc, 1, 1, 1); MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1); MODULE_DEPEND(nfscl, nfslock, 1, 1, 1); + diff --git a/freebsd/sys/fs/nfsclient/nfs_clrpcops.c b/freebsd/sys/fs/nfsclient/nfs_clrpcops.c index 53e4a525..ce0aad47 100644 --- a/freebsd/sys/fs/nfsclient/nfs_clrpcops.c +++ b/freebsd/sys/fs/nfsclient/nfs_clrpcops.c @@ -7740,3 +7740,4 @@ out: } return (laystat); } + diff --git a/freebsd/sys/fs/nfsclient/nfs_clstate.c b/freebsd/sys/fs/nfsclient/nfs_clstate.c index 6a93b183..1a82fd73 100644 --- a/freebsd/sys/fs/nfsclient/nfs_clstate.c +++ b/freebsd/sys/fs/nfsclient/nfs_clstate.c @@ -5457,3 +5457,4 @@ tryagain: NFSUNLOCKCLSTATE(); return (0); } + diff --git a/freebsd/sys/fs/nfsclient/nfs_clsubs.c b/freebsd/sys/fs/nfsclient/nfs_clsubs.c index af0f3c62..a0c794dd 100644 --- a/freebsd/sys/fs/nfsclient/nfs_clsubs.c +++ b/freebsd/sys/fs/nfsclient/nfs_clsubs.c @@ -394,3 +394,4 @@ ncl_init(struct vfsconf *vfsp) return (0); } + diff --git a/freebsd/sys/fs/nfsclient/nfs_clvfsops.c b/freebsd/sys/fs/nfsclient/nfs_clvfsops.c index 70a897fe..95731499 100644 --- a/freebsd/sys/fs/nfsclient/nfs_clvfsops.c +++ b/freebsd/sys/fs/nfsclient/nfs_clvfsops.c @@ -2060,3 +2060,4 @@ void nfscl_retopts(struct nfsmount *nmp, char *buffer, size_t buflen) nfscl_printoptval(nmp, nmp->nm_timeo, ",timeout", &buf, &blen); nfscl_printoptval(nmp, nmp->nm_retry, ",retrans", &buf, &blen); } + diff --git a/freebsd/sys/fs/nfsclient/nfs_clvnops.c b/freebsd/sys/fs/nfsclient/nfs_clvnops.c index d52d1b28..8da6bfe2 100644 --- a/freebsd/sys/fs/nfsclient/nfs_clvnops.c +++ b/freebsd/sys/fs/nfsclient/nfs_clvnops.c @@ -817,7 +817,7 @@ nfs_close(struct vop_close_args *ap) int cm = newnfs_commit_on_close ? 1 : 0; error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0); /* np->n_flag &= ~NMODIFIED; */ - } else if (NFS_ISV4(vp)) { + } else if (NFS_ISV4(vp)) { if (nfscl_mustflush(vp) != 0) { int cm = newnfs_commit_on_close ? 1 : 0; error = ncl_flush(vp, MNT_WAIT, ap->a_td, @@ -833,10 +833,10 @@ nfs_close(struct vop_close_args *ap) } NFSLOCKNODE(np); } - /* + /* * Invalidate the attribute cache in all cases. * An open is going to fetch fresh attrs any way, other procs - * on this node that have file open will be forced to do an + * on this node that have file open will be forced to do an * otw attr fetch, but this is safe. * --> A user found that their RPC count dropped by 20% when * this was commented out and I can't see any requirement @@ -891,7 +891,7 @@ nfs_close(struct vop_close_args *ap) np->n_directio_asyncwr)); if (newnfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) { NFSLOCKNODE(np); - KASSERT((np->n_directio_opens > 0), + KASSERT((np->n_directio_opens > 0), ("nfs_close: unexpectedly value (0) of n_directio_opens\n")); np->n_directio_opens--; if (np->n_directio_opens == 0) @@ -1021,7 +1021,7 @@ nfs_setattr(struct vop_setattr_args *ap) vap->va_mode == (mode_t)VNOVAL && vap->va_uid == (uid_t)VNOVAL && vap->va_gid == (gid_t)VNOVAL) - return (0); + return (0); vap->va_size = VNOVAL; break; default: @@ -1072,7 +1072,7 @@ nfs_setattr(struct vop_setattr_args *ap) } } else { NFSLOCKNODE(np); - if ((vap->va_mtime.tv_sec != VNOVAL || vap->va_atime.tv_sec != VNOVAL) && + if ((vap->va_mtime.tv_sec != VNOVAL || vap->va_atime.tv_sec != VNOVAL) && (np->n_flag & NMODIFIED) && vp->v_type == VREG) { NFSUNLOCKNODE(np); error = ncl_vinvalbuf(vp, V_SAVE, td, 1); @@ -1146,7 +1146,7 @@ nfs_lookup(struct vop_lookup_args *ap) struct nfsvattr dnfsva, nfsva; struct vattr vattr; struct timespec nctime; - + *vpp = NULLVP; if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) @@ -1223,7 +1223,7 @@ nfs_lookup(struct vop_lookup_args *ap) cache_purge(newvp); if (dvp != newvp) vput(newvp); - else + else vrele(newvp); *vpp = NULLVP; } else if (error == ENOENT) { @@ -1379,7 +1379,7 @@ nfs_lookup(struct vop_lookup_args *ap) (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); else if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && - !(np->n_flag & NMODIFIED)) { + !(np->n_flag & NMODIFIED)) { /* * Flush the attribute cache when opening a * leaf node to ensure that fresh attributes @@ -1711,7 +1711,7 @@ again: /* try again without setting uid/gid */ vap->va_uid = (uid_t)VNOVAL; vap->va_gid = (uid_t)VNOVAL; - error = nfsrpc_setattr(newvp, vap, NULL, + error = nfsrpc_setattr(newvp, vap, NULL, cnp->cn_cred, cnp->cn_thread, &nfsva, &attrflag, NULL); } @@ -1899,7 +1899,7 @@ nfs_rename(struct vop_rename_args *ap) * under NFSV3. NFSV2 does not have this problem because * ( as far as I can tell ) it flushes dirty buffers more * often. - * + * * Skip the rename operation if the fsync fails, this can happen * due to the server's volume being full, when we pushed out data * that was written back to our cache earlier. Not checking for @@ -2311,10 +2311,10 @@ nfs_readdir(struct vop_readdir_args *ap) ssize_t tresid, left; int error = 0; struct vattr vattr; - + if (ap->a_eofflag != NULL) *ap->a_eofflag = 0; - if (vp->v_type != VDIR) + if (vp->v_type != VDIR) return(EPERM); /* @@ -2358,7 +2358,7 @@ nfs_readdir(struct vop_readdir_args *ap) if (ap->a_eofflag != NULL) *ap->a_eofflag = 1; } - + /* Add the partial DIRBLKSIZ (left) back in. */ uio->uio_resid += left; return (error); @@ -2392,7 +2392,7 @@ ncl_readdirrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, cookie = *cookiep; ncl_dircookie_unlock(dnp); } else { - ncl_dircookie_unlock(dnp); + ncl_dircookie_unlock(dnp); return (NFSERR_BAD_COOKIE); } @@ -2510,11 +2510,11 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) sp->s_dvp = dvp; VREF(dvp); - /* + /* * Fudge together a funny name. - * Changing the format of the funny name to accommodate more + * Changing the format of the funny name to accommodate more * sillynames per directory. - * The name is now changed to .nfs...4, where ticks is + * The name is now changed to .nfs...4, where ticks is * CPU ticks since boot. */ #ifndef __rtems__ @@ -2524,8 +2524,8 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) #endif /* __rtems__ */ lticks = (unsigned int)ticks; for ( ; ; ) { - sp->s_namlen = sprintf(sp->s_name, - ".nfs.%08x.%04x4.4", lticks, + sp->s_namlen = sprintf(sp->s_name, + ".nfs.%08x.%04x4.4", lticks, pid); if (nfs_lookitup(dvp, sp->s_name, sp->s_namlen, sp->s_cred, cnp->cn_thread, NULL)) @@ -3061,12 +3061,12 @@ loop: while (np->n_directio_asyncwr > 0) { np->n_flag |= NFSYNCWAIT; error = newnfs_msleep(td, &np->n_directio_asyncwr, - &np->n_mtx, slpflag | (PRIBIO + 1), + &np->n_mtx, slpflag | (PRIBIO + 1), "nfsfsync", 0); if (error) { if (newnfs_sigintr(nmp, td)) { NFSUNLOCKNODE(np); - error = EINTR; + error = EINTR; goto done; } } @@ -3126,7 +3126,7 @@ nfs_advlock(struct vop_advlock_args *ap) struct vattr va; int ret, error = EOPNOTSUPP; u_quad_t size; - + ret = NFSVOPLOCK(vp, LK_SHARED); if (ret != 0) return (EBADF); @@ -3261,7 +3261,7 @@ nfs_advlockasync(struct vop_advlockasync_args *ap) struct vnode *vp = ap->a_vp; u_quad_t size; int error; - + if (NFS_ISV4(vp)) return (EOPNOTSUPP); error = NFSVOPLOCK(vp, LK_SHARED); @@ -3409,7 +3409,7 @@ nfsfifo_read(struct vop_read_args *ap) vfs_timestamp(&np->n_atim); NFSUNLOCKNODE(np); error = fifo_specops.vop_read(ap); - return error; + return error; #else /* __rtems__ */ return (EINVAL); #endif /* __rtems__ */ @@ -3646,3 +3646,4 @@ nfs_pathconf(struct vop_pathconf_args *ap) } return (error); } + -- cgit v1.2.3