diff options
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/ext2fs/ext2_alloc.c | 3 | ||||
-rw-r--r-- | sys/fs/ext2fs/ext2_bmap.c | 8 | ||||
-rw-r--r-- | sys/fs/ext2fs/ext2_vfsops.c | 6 | ||||
-rw-r--r-- | sys/fs/nandfs/nandfs_segment.c | 6 | ||||
-rw-r--r-- | sys/fs/nfs/nfs_commonacl.c | 4 | ||||
-rw-r--r-- | sys/fs/nfs/nfs_commonport.c | 2 | ||||
-rw-r--r-- | sys/fs/nfs/nfs_commonsubs.c | 10 | ||||
-rw-r--r-- | sys/fs/nfsclient/nfs_clbio.c | 4 | ||||
-rw-r--r-- | sys/fs/nfsclient/nfs_clport.c | 2 | ||||
-rw-r--r-- | sys/fs/nfsclient/nfs_clrpcops.c | 6 | ||||
-rw-r--r-- | sys/fs/nfsclient/nfs_clstate.c | 4 | ||||
-rw-r--r-- | sys/fs/nfsclient/nfs_clvnops.c | 2 | ||||
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdport.c | 8 | ||||
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdserv.c | 28 | ||||
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdsocket.c | 2 | ||||
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdsubs.c | 2 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_io.c | 2 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_subr.c | 1 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/tmpfs/tmpfs_subr.c | 2 | ||||
-rw-r--r-- | sys/fs/unionfs/union_subr.c | 4 |
21 files changed, 58 insertions, 50 deletions
diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c index 9d5417c..c3bd29b 100644 --- a/sys/fs/ext2fs/ext2_alloc.c +++ b/sys/fs/ext2fs/ext2_alloc.c @@ -161,7 +161,7 @@ ext2_reallocblks(struct vop_reallocblks_args *ap) struct inode *ip; struct vnode *vp; struct buf *sbp, *ebp; - uint32_t *bap, *sbap, *ebap = 0; + uint32_t *bap, *sbap, *ebap; struct ext2mount *ump; struct cluster_save *buflist; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; @@ -231,6 +231,7 @@ ext2_reallocblks(struct vop_reallocblks_args *ap) /* * If the block range spans two block maps, get the second map. */ + ebap = NULL; if (end_lvl == 0 || (idp = &end_ap[end_lvl - 1])->in_off + 1 >= len) { ssize = len; } else { diff --git a/sys/fs/ext2fs/ext2_bmap.c b/sys/fs/ext2fs/ext2_bmap.c index 8e5e986..7966b9b 100644 --- a/sys/fs/ext2fs/ext2_bmap.c +++ b/sys/fs/ext2fs/ext2_bmap.c @@ -42,6 +42,7 @@ #include <sys/proc.h> #include <sys/vnode.h> #include <sys/mount.h> +#include <sys/racct.h> #include <sys/resourcevar.h> #include <sys/stat.h> @@ -247,6 +248,13 @@ ext2_bmaparray(struct vnode *vp, daddr_t bn, daddr_t *bnp, int *runp, int *runb) vfs_busy_pages(bp, 0); bp->b_iooffset = dbtob(bp->b_blkno); bstrategy(bp); +#ifdef RACCT + if (racct_enable) { + PROC_LOCK(curproc); + racct_add_buf(curproc, bp, 0); + PROC_UNLOCK(curproc); + } +#endif curthread->td_ru.ru_inblock++; error = bufwait(bp); if (error) { diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index fab98a5..a1f3c51 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -308,8 +308,8 @@ ext2_check_sb_compat(struct ext2fs *es, struct cdev *dev, int ronly) } /* - * This computes the fields of the ext2_sb_info structure from the - * data in the ext2_super_block structure read in. + * This computes the fields of the m_ext2fs structure from the + * data in the ext2fs structure read in. */ static int compute_sb_data(struct vnode *devvp, struct ext2fs *es, @@ -600,7 +600,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp) /* * I don't know whether this is the right strategy. Note that - * we dynamically allocate both an ext2_sb_info and an ext2_super_block + * we dynamically allocate both an m_ext2fs and an ext2fs * while Linux keeps the super block in a locked buffer. */ ump->um_e2fs = malloc(sizeof(struct m_ext2fs), diff --git a/sys/fs/nandfs/nandfs_segment.c b/sys/fs/nandfs/nandfs_segment.c index 22fb7cd..38019ef 100644 --- a/sys/fs/nandfs/nandfs_segment.c +++ b/sys/fs/nandfs/nandfs_segment.c @@ -199,7 +199,7 @@ delete_segment(struct nandfs_seginfo *seginfo) TAILQ_REMOVE(&seg->segsum, bp, b_cluster.cluster_entry); bp->b_flags &= ~B_MANAGED; brelse(bp); - }; + } LIST_REMOVE(seg, seg_link); free(seg, M_DEVBUF); @@ -752,7 +752,7 @@ nandfs_clean_segblocks(struct nandfs_segment *seg, uint8_t unlock) TAILQ_FOREACH_SAFE(bp, &seg->segsum, b_cluster.cluster_entry, tbp) { TAILQ_REMOVE(&seg->segsum, bp, b_cluster.cluster_entry); nandfs_clean_buf(fsdev, bp); - }; + } TAILQ_FOREACH_SAFE(bp, &seg->data, b_cluster.cluster_entry, tbp) { TAILQ_REMOVE(&seg->data, bp, b_cluster.cluster_entry); @@ -807,7 +807,7 @@ nandfs_save_segblocks(struct nandfs_segment *seg, uint8_t unlock) goto out; } i++; - }; + } i = 0; TAILQ_FOREACH_SAFE(bp, &seg->data, b_cluster.cluster_entry, tbp) { diff --git a/sys/fs/nfs/nfs_commonacl.c b/sys/fs/nfs/nfs_commonacl.c index 0201e2d..d6ba742 100644 --- a/sys/fs/nfs/nfs_commonacl.c +++ b/sys/fs/nfs/nfs_commonacl.c @@ -436,7 +436,7 @@ nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *aclp, enum vtype type, break; default: continue; - }; + } retlen += nfsrv_buildace(nd, name, namelen, type, isgroup, isowner, &aclp->acl_entry[i]); entrycnt++; @@ -505,7 +505,7 @@ nfsrv_compareacl(NFSACL_T *aclp1, NFSACL_T *aclp2) case ACL_OTHER: if (acep1->ae_perm != acep2->ae_perm) return (1); - }; + } acep1++; acep2++; } diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index a22b38c..a62a222 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -337,7 +337,7 @@ nfsvno_pathconf(struct vnode *vp, int flag, register_t *retf, */ *retf = 0; printf("nfsrvd pathconf flag=%d not supp\n", flag); - }; + } error = 0; } NFSEXITCODE(error); diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 16d91af..0d46d95 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -507,7 +507,7 @@ nfsm_fhtom(struct nfsrv_descript *nd, u_int8_t *fhp, int size, int set_true) } (void) nfsm_strtom(nd, fhp, size); break; - }; + } return (bytesize); } @@ -544,7 +544,7 @@ nfsaddr_match(int family, union nethostaddr *haddr, NFSSOCKADDR_T nam) } break; #endif - }; + } return (0); } @@ -581,7 +581,7 @@ nfsaddr2_match(NFSSOCKADDR_T nam1, NFSSOCKADDR_T nam2) } break; #endif - }; + } return (0); } @@ -1774,7 +1774,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, */ bitpos = NFSATTRBIT_MAX; break; - }; + } } /* @@ -2508,7 +2508,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, break; default: printf("EEK! Bad V4 attribute bitpos=%d\n", bitpos); - }; + } } } if (naclp != NULL) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 3498dc0..567e326 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -681,7 +681,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) ncl_printf(" ncl_bioread: type %x unexpected\n", vp->v_type); bp = NULL; break; - }; + } if (n > 0) { error = vn_io_fault_uiomove(bp->b_data + on, (int)n, uio); @@ -1664,7 +1664,7 @@ ncl_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td, default: ncl_printf("ncl_doio: type %x unexpected\n", vp->v_type); break; - }; + } if (error) { bp->b_ioflags |= BIO_ERROR; bp->b_error = error; diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index eaa445b..c063de1 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -925,7 +925,7 @@ nfscl_fillsattr(struct nfsrv_descript *nd, struct vattr *vap, (void) nfsv4_fillattr(nd, vp->v_mount, vp, NULL, vap, NULL, 0, &attrbits, NULL, NULL, 0, 0, 0, 0, (uint64_t)0); break; - }; + } } /* diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index a7d47f0..cd12fba 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -487,7 +487,7 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen, default: error = NFSERR_BADXDR; goto nfsmout; - }; + } } else { ndp->nfsdl_flags = NFSCLDL_READ; } @@ -2086,7 +2086,7 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap, default: error = NFSERR_BADXDR; goto nfsmout; - }; + } } else { dp->nfsdl_flags = NFSCLDL_READ; } @@ -3698,7 +3698,7 @@ nfsrpc_advlock(vnode_t vp, off_t size, int op, struct flock *fl, break; default: return (EINVAL); - }; + } if (start < 0) return (EINVAL); if (fl->l_len != 0) { diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 2600b80..a49e93f 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -1297,7 +1297,7 @@ nfscl_checkwritelocked(vnode_t vp, struct flock *fl, break; default: return (1); - }; + } if (fl->l_len != 0) { end = off + fl->l_len; if (end < off) @@ -3507,7 +3507,7 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) error = NFSERR_NOTSUPP; } break; - }; + } if (error) { if (error == EBADRPC || error == NFSERR_BADXDR) { nd->nd_repstat = NFSERR_BADXDR; diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 6aee675..4487b2a 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -974,7 +974,7 @@ nfs_setattr(struct vop_setattr_args *ap) mtx_lock(&np->n_mtx); np->n_vattr.na_size = np->n_size = vap->va_size; mtx_unlock(&np->n_mtx); - }; + } } else { mtx_lock(&np->n_mtx); if ((vap->va_mtime.tv_sec != VNOVAL || vap->va_atime.tv_sec != VNOVAL) && diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index edbcb35..44ae88e 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -2370,7 +2370,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsvattr *nvap, vfs_timestamp(&nvap->na_atime); nvap->na_vaflags |= VA_UTIMES_NULL; break; - }; + } NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); switch (fxdr_unsigned(int, *tl)) { case NFSV3SATTRTIME_TOCLIENT: @@ -2383,11 +2383,11 @@ nfsrv_sattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsvattr *nvap, if (!toclient) nvap->na_vaflags |= VA_UTIMES_NULL; break; - }; + } break; case ND_NFSV4: error = nfsv4_sattr(nd, vp, nvap, attrbitp, aclp, p); - }; + } nfsmout: NFSEXITCODE2(error, nd); return (error); @@ -2585,7 +2585,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsvattr *nvap, */ bitpos = NFSATTRBIT_MAX; break; - }; + } } /* diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index bd054c4..2a0c9cf 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -1024,7 +1024,7 @@ nfsrvd_create(struct nfsrv_descript *nd, __unused int isdgram, break; default: break; - }; + } } else { NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); how = fxdr_unsigned(int, *tl); @@ -1041,7 +1041,7 @@ nfsrvd_create(struct nfsrv_descript *nd, __unused int isdgram, cverf[1] = *tl; exclusive_flag = 1; break; - }; + } NFSVNO_SETATTRVAL(&nva, type, VREG); } } @@ -1088,7 +1088,7 @@ nfsrvd_create(struct nfsrv_descript *nd, __unused int isdgram, if (named.ni_vp == NULL) NFSVNO_SETATTRVAL(&nva, mode, 0); break; - }; + } } /* @@ -2206,7 +2206,7 @@ nfsrvd_lock(struct nfsrv_descript *nd, __unused int isdgram, default: nd->nd_repstat = NFSERR_BADXDR; goto nfsmout; - }; + } if (*tl++ == newnfs_true) flags |= NFSLCK_RECLAIM; offset = fxdr_hyper(tl); @@ -2400,7 +2400,7 @@ nfsrvd_lockt(struct nfsrv_descript *nd, __unused int isdgram, default: nd->nd_repstat = NFSERR_BADXDR; goto nfsmout; - }; + } lo.lo_first = fxdr_hyper(tl); tl += 2; len = fxdr_hyper(tl); @@ -2509,7 +2509,7 @@ nfsrvd_locku(struct nfsrv_descript *nd, __unused int isdgram, free(stp, M_NFSDSTATE); free(lop, M_NFSDLOCK); goto nfsmout; - }; + } stp->ls_ownerlen = 0; stp->ls_uid = nd->nd_cred->cr_uid; stp->ls_seq = fxdr_unsigned(int, *tl++); @@ -2645,7 +2645,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, default: /* nd_repstat will be set to NFSERR_INVAL below. */ break; - }; + } } switch (i) { case NFSV4OPEN_ACCESSREAD: @@ -2659,7 +2659,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, break; default: nd->nd_repstat = NFSERR_INVAL; - }; + } i = fxdr_unsigned(int, *tl++); switch (i) { case NFSV4OPEN_DENYNONE: @@ -2675,7 +2675,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, break; default: nd->nd_repstat = NFSERR_INVAL; - }; + } clientid.lval[0] = *tl++; clientid.lval[1] = *tl; if ((nd->nd_flag & ND_IMPLIEDCLID) != 0) { @@ -2750,7 +2750,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, default: nd->nd_repstat = NFSERR_BADXDR; goto nfsmout; - }; + } } else if (create != NFSV4OPEN_NOCREATE) { nd->nd_repstat = NFSERR_BADXDR; goto nfsmout; @@ -2832,7 +2832,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, case NFSCREATE_EXCLUSIVE41: exclusive_flag = 1; break; - }; + } } nfsvno_open(nd, &named, clientid, &stateid, stp, &exclusive_flag, &nva, cverf, create, aclp, &attrbits, @@ -2853,7 +2853,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram, default: nd->nd_repstat = NFSERR_BADXDR; goto nfsmout; - }; + } stp->ls_flags |= NFSLCK_RECLAIM; } else { /* CLAIM_NULL_FH */ @@ -3247,7 +3247,7 @@ nfsrvd_opendowngrade(struct nfsrv_descript *nd, __unused int isdgram, break; default: nd->nd_repstat = NFSERR_BADXDR; - }; + } i = fxdr_unsigned(int, *tl); switch (i) { case NFSV4OPEN_DENYNONE: @@ -3263,7 +3263,7 @@ nfsrvd_opendowngrade(struct nfsrv_descript *nd, __unused int isdgram, break; default: nd->nd_repstat = NFSERR_BADXDR; - }; + } clientid.lval[0] = stp->ls_stateid.other[0]; clientid.lval[1] = stp->ls_stateid.other[1]; diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index 4497161..4e995c1 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -992,7 +992,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, NULL, p, &vpnes); } } - }; + } if (error) { if (error == EBADRPC || error == NFSERR_BADXDR) { nd->nd_repstat = NFSERR_BADXDR; diff --git a/sys/fs/nfsserver/nfs_nfsdsubs.c b/sys/fs/nfsserver/nfs_nfsdsubs.c index c0421e3..c177f45 100644 --- a/sys/fs/nfsserver/nfs_nfsdsubs.c +++ b/sys/fs/nfsserver/nfs_nfsdsubs.c @@ -1814,7 +1814,7 @@ nfsrv_putreferralattr(struct nfsrv_descript *nd, nfsattrbit_t *retbitp, break; default: printf("EEK! Bad V4 refattr bitpos=%d\n", bitpos); - }; + } } } *retnump = txdr_unsigned(retnum); diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index 4de3827..f549160 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -342,7 +342,7 @@ smbfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td default: printf("smbfs_doio: type %x unexpected\n",vp->v_type); break; - }; + } if (error) { bp->b_error = error; bp->b_ioflags |= BIO_ERROR; diff --git a/sys/fs/smbfs/smbfs_subr.c b/sys/fs/smbfs/smbfs_subr.c index 4e9f77d..a97fb80 100644 --- a/sys/fs/smbfs/smbfs_subr.c +++ b/sys/fs/smbfs/smbfs_subr.c @@ -59,7 +59,6 @@ void smb_time_server2local(u_long seconds, int tzoff, struct timespec *tsp) { tsp->tv_sec = seconds + tzoff * 60; - /*+ tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0)*/; } /* diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index c78ceb2..1c762b0 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -341,7 +341,7 @@ smbfs_setattr(ap) default: error = EINVAL; goto out; - }; + } if (isreadonly) { error = EROFS; goto out; diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index fcc8782..72e8792 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -945,7 +945,7 @@ tmpfs_dir_attach_dup(struct tmpfs_node *dnode, LIST_INSERT_BEFORE(de, nde, uh.td_dup.index_entries); LIST_INSERT_HEAD(duphead, nde, uh.td_dup.entries); return; - }; + } } /* diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 951d775..6f53473 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -1238,7 +1238,7 @@ unionfs_checkuppervp(struct vnode *vp, char *fil, int lno) "unionfs_checkuppervp: on non-unionfs-node.\n"); #endif panic("unionfs_checkuppervp"); - }; + } #endif return (unp->un_uppervp); } @@ -1258,7 +1258,7 @@ unionfs_checklowervp(struct vnode *vp, char *fil, int lno) "unionfs_checklowervp: on non-unionfs-node.\n"); #endif panic("unionfs_checklowervp"); - }; + } #endif return (unp->un_lowervp); } |