From owner-p4-projects@FreeBSD.ORG Thu May 6 18:47:03 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 050571065674; Thu, 6 May 2010 18:47:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BBB79106566C for ; Thu, 6 May 2010 18:47:02 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id AA1A88FC12 for ; Thu, 6 May 2010 18:47:02 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o46Il2J9053269 for ; Thu, 6 May 2010 18:47:02 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o46Il2o4053267 for perforce@freebsd.org; Thu, 6 May 2010 18:47:02 GMT (envelope-from trasz@freebsd.org) Date: Thu, 6 May 2010 18:47:02 GMT Message-Id: <201005061847.o46Il2o4053267@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 177854 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:47:03 -0000 http://p4web.freebsd.org/@@177854?ac=10 Change 177854 by trasz@trasz_victim on 2010/05/06 18:46:20 Adapt to recent changes regarding vn_rlimit_fsize(). Affected files ... .. //depot/projects/soc2009/trasz_limits/sys/fs/msdosfs/msdosfs_vnops.c#9 edit .. //depot/projects/soc2009/trasz_limits/sys/fs/nfsclient/nfs_clbio.c#13 edit .. //depot/projects/soc2009/trasz_limits/sys/kern/vfs_vnops.c#13 edit Differences ... ==== //depot/projects/soc2009/trasz_limits/sys/fs/msdosfs/msdosfs_vnops.c#9 (text+ko) ==== @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include ==== //depot/projects/soc2009/trasz_limits/sys/fs/nfsclient/nfs_clbio.c#13 (text+ko) ==== @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include ==== //depot/projects/soc2009/trasz_limits/sys/kern/vfs_vnops.c#13 (text+ko) ==== @@ -1343,17 +1343,10 @@ int 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)) { - psignal(td->td_proc, SIGXFSZ); - PROC_UNLOCK(td->td_proc); - return (EFBIG); - } - PROC_UNLOCK(td->td_proc); - - return (0); + return (hrl_allocated(td->td_proc, HRL_RESOURCE_FILESIZE, + (uoff_t)uio->uio_offset + uio->uio_resid)); }