Ffs_alloc allow users to write one block beyond the limit.
PR: 3398 Reviewed by: phk Submitted by: Wolfram Schneider <wosch@apfel.de>
This commit is contained in:
parent
5ce42b233d
commit
62958c1815
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95
|
||||
* $Id: ffs_alloc.c,v 1.34 1997/08/04 07:30:43 phk Exp $
|
||||
* $Id: ffs_alloc.c,v 1.35 1997/09/02 20:06:44 bde Exp $
|
||||
*/
|
||||
|
||||
#include "opt_quota.h"
|
||||
@ -117,7 +117,7 @@ ffs_alloc(ip, lbn, bpref, size, cred, bnp)
|
||||
#endif /* DIAGNOSTIC */
|
||||
if (size == fs->fs_bsize && fs->fs_cstotal.cs_nbfree == 0)
|
||||
goto nospace;
|
||||
if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) <= 0)
|
||||
if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) - size < 0)
|
||||
goto nospace;
|
||||
#ifdef QUOTA
|
||||
error = chkdq(ip, (long)btodb(size), cred, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user