ext2_alloc.c (42374) | ext2_alloc.c (43301) |
---|---|
1/* 2 * modified for Lites 1.1 3 * 4 * Aug 1995, Godmar Back (gback@cs.utah.edu) 5 * University of Utah, Department of Computer Science 6 */ 7/* 8 * Copyright (c) 1982, 1986, 1989, 1993 --- 112 unchanged lines hidden (view full) --- 121 panic("ext2_alloc: missing credential"); 122#endif /* DIAGNOSTIC */ 123 if (size == fs->s_blocksize && fs->s_es->s_free_blocks_count == 0) 124 goto nospace; 125 if (cred->cr_uid != 0 && 126 fs->s_es->s_free_blocks_count < fs->s_es->s_r_blocks_count) 127 goto nospace; 128#if QUOTA | 1/* 2 * modified for Lites 1.1 3 * 4 * Aug 1995, Godmar Back (gback@cs.utah.edu) 5 * University of Utah, Department of Computer Science 6 */ 7/* 8 * Copyright (c) 1982, 1986, 1989, 1993 --- 112 unchanged lines hidden (view full) --- 121 panic("ext2_alloc: missing credential"); 122#endif /* DIAGNOSTIC */ 123 if (size == fs->s_blocksize && fs->s_es->s_free_blocks_count == 0) 124 goto nospace; 125 if (cred->cr_uid != 0 && 126 fs->s_es->s_free_blocks_count < fs->s_es->s_r_blocks_count) 127 goto nospace; 128#if QUOTA |
129 if (error = chkdq(ip, (long)btodb(size), cred, 0)) | 129 if ((error = chkdq(ip, (long)btodb(size), cred, 0)) != 0) |
130 return (error); 131#endif 132 if (bpref >= fs->s_es->s_blocks_count) 133 bpref = 0; 134 /* call the Linux code */ 135#ifdef EXT2_PREALLOCATE 136 /* To have a preallocation hit, we must 137 * - have at least one block preallocated --- 417 unchanged lines hidden --- | 130 return (error); 131#endif 132 if (bpref >= fs->s_es->s_blocks_count) 133 bpref = 0; 134 /* call the Linux code */ 135#ifdef EXT2_PREALLOCATE 136 /* To have a preallocation hit, we must 137 * - have at least one block preallocated --- 417 unchanged lines hidden --- |