From owner-svn-src-head@FreeBSD.ORG Thu May 6 18:43:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B57C91065670; Thu, 6 May 2010 18:43:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9AC768FC17; Thu, 6 May 2010 18:43:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IhJ6h058011; Thu, 6 May 2010 18:43:19 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IhJxk058006; Thu, 6 May 2010 18:43:19 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201005061843.o46IhJxk058006@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 6 May 2010 18:43:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207719 - in head/sys: fs/msdosfs fs/tmpfs kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:43:19 -0000 Author: trasz Date: Thu May 6 18:43:19 2010 New Revision: 207719 URL: http://svn.freebsd.org/changeset/base/207719 Log: Style fixes and removal of unneeded variable. Submitted by: bde@ Modified: head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/vfs_vnops.c head/sys/sys/vnode.h Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Thu May 6 18:43:00 2010 (r207718) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Thu May 6 18:43:19 2010 (r207719) @@ -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); /* Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Thu May 6 18:43:00 2010 (r207718) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Thu May 6 18:43:19 2010 (r207719) @@ -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; Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu May 6 18:43:00 2010 (r207718) +++ head/sys/kern/vfs_vnops.c Thu May 6 18:43:19 2010 (r207719) @@ -1341,11 +1341,12 @@ vn_vget_ino(struct vnode *vp, ino_t ino, } 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, return (EFBIG); } PROC_UNLOCK(td->td_proc); - return (0); } Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Thu May 6 18:43:00 2010 (r207718) +++ head/sys/sys/vnode.h Thu May 6 18:43:19 2010 (r207719) @@ -655,6 +655,8 @@ int vn_rdwr_inchunks(enum uio_rw rw, str 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 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 */