Return ENOSPC when out of inodes
This commit is contained in:
parent
42a2c1a03a
commit
912b4e0cb7
@ -49,7 +49,7 @@ PUBLIC struct inode *alloc_inode(struct inode *parent, mode_t bits)
|
|||||||
/* Acquire an inode from the bit map. */
|
/* Acquire an inode from the bit map. */
|
||||||
b = alloc_inode_bit(sp, parent, (bits & I_TYPE) == I_DIRECTORY);
|
b = alloc_inode_bit(sp, parent, (bits & I_TYPE) == I_DIRECTORY);
|
||||||
if (b == NO_BIT) {
|
if (b == NO_BIT) {
|
||||||
err_code = ENFILE;
|
err_code = ENOSPC;
|
||||||
major = (int) (sp->s_dev >> MAJOR) & BYTE;
|
major = (int) (sp->s_dev >> MAJOR) & BYTE;
|
||||||
minor = (int) (sp->s_dev >> MINOR) & BYTE;
|
minor = (int) (sp->s_dev >> MINOR) & BYTE;
|
||||||
ext2_debug("Out of i-nodes on device %d/%d\n", major, minor);
|
ext2_debug("Out of i-nodes on device %d/%d\n", major, minor);
|
||||||
|
@ -273,7 +273,7 @@ PUBLIC struct inode *alloc_inode(dev_t dev, mode_t bits)
|
|||||||
/* Acquire an inode from the bit map. */
|
/* Acquire an inode from the bit map. */
|
||||||
b = alloc_bit(sp, IMAP, sp->s_isearch);
|
b = alloc_bit(sp, IMAP, sp->s_isearch);
|
||||||
if (b == NO_BIT) {
|
if (b == NO_BIT) {
|
||||||
err_code = ENFILE;
|
err_code = ENOSPC;
|
||||||
major = (int) (sp->s_dev >> MAJOR) & BYTE;
|
major = (int) (sp->s_dev >> MAJOR) & BYTE;
|
||||||
minor = (int) (sp->s_dev >> MINOR) & BYTE;
|
minor = (int) (sp->s_dev >> MINOR) & BYTE;
|
||||||
printf("Out of i-nodes on device %d/%d\n", major, minor);
|
printf("Out of i-nodes on device %d/%d\n", major, minor);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user