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 */
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to