Style fixes and removal of unneeded variable.
Submitted by: bde@
This commit is contained in:
parent
2e3a546047
commit
307d88b787
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=207719
@ -652,7 +652,6 @@ msdosfs_write(ap)
|
||||
struct buf *bp;
|
||||
int ioflag = ap->a_ioflag;
|
||||
struct uio *uio = ap->a_uio;
|
||||
struct thread *td = uio->uio_td;
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct vnode *thisvp;
|
||||
struct denode *dep = VTODE(vp);
|
||||
@ -696,7 +695,7 @@ msdosfs_write(ap)
|
||||
/*
|
||||
* If they've exceeded their filesize limit, tell them about it.
|
||||
*/
|
||||
if (vn_rlimit_fsize(vp, uio, td))
|
||||
if (vn_rlimit_fsize(vp, uio, uio->uio_td))
|
||||
return (EFBIG);
|
||||
|
||||
/*
|
||||
|
@ -717,7 +717,6 @@ tmpfs_write(struct vop_write_args *v)
|
||||
struct vnode *vp = v->a_vp;
|
||||
struct uio *uio = v->a_uio;
|
||||
int ioflag = v->a_ioflag;
|
||||
struct thread *td = uio->uio_td;
|
||||
|
||||
boolean_t extended;
|
||||
int error = 0;
|
||||
@ -747,7 +746,7 @@ tmpfs_write(struct vop_write_args *v)
|
||||
VFS_TO_TMPFS(vp->v_mount)->tm_maxfilesize)
|
||||
return (EFBIG);
|
||||
|
||||
if (vn_rlimit_fsize(vp, uio, td))
|
||||
if (vn_rlimit_fsize(vp, uio, uio->uio_td))
|
||||
return (EFBIG);
|
||||
|
||||
extended = uio->uio_offset + uio->uio_resid > node->tn_size;
|
||||
|
@ -1341,11 +1341,12 @@ vn_vget_ino(struct vnode *vp, ino_t ino, int lkflags, struct vnode **rvp)
|
||||
}
|
||||
|
||||
int
|
||||
vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio, const struct thread *td)
|
||||
vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio,
|
||||
const struct thread *td)
|
||||
{
|
||||
|
||||
if (vp->v_type != VREG || td == NULL)
|
||||
return (0);
|
||||
|
||||
PROC_LOCK(td->td_proc);
|
||||
if (uio->uio_offset + uio->uio_resid >
|
||||
lim_cur(td->td_proc, RLIMIT_FSIZE)) {
|
||||
@ -1354,6 +1355,5 @@ vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio, const struct thre
|
||||
return (EFBIG);
|
||||
}
|
||||
PROC_UNLOCK(td->td_proc);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -655,6 +655,8 @@ int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base,
|
||||
size_t len, off_t offset, enum uio_seg segflg, int ioflg,
|
||||
struct ucred *active_cred, struct ucred *file_cred, size_t *aresid,
|
||||
struct thread *td);
|
||||
int vn_rlimit_fsize(const struct vnode *vn, const struct uio *uio,
|
||||
const struct thread *td);
|
||||
int vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred,
|
||||
struct ucred *file_cred, struct thread *td);
|
||||
int vn_start_write(struct vnode *vp, struct mount **mpp, int flags);
|
||||
@ -670,6 +672,7 @@ int vn_extattr_rm(struct vnode *vp, int ioflg, int attrnamespace,
|
||||
int vn_vget_ino(struct vnode *vp, ino_t ino, int lkflags,
|
||||
struct vnode **rvp);
|
||||
|
||||
|
||||
int vfs_cache_lookup(struct vop_lookup_args *ap);
|
||||
void vfs_timestamp(struct timespec *);
|
||||
void vfs_write_resume(struct mount *mp);
|
||||
@ -780,7 +783,6 @@ struct dirent;
|
||||
int vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off);
|
||||
|
||||
int vfs_unixify_accmode(accmode_t *accmode);
|
||||
int vn_rlimit_fsize(const struct vnode *vn, const struct uio *uio, const struct thread *td);
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user