Return ENOSPC when out of inodes

This commit is contained in:
Erik van der Kouwe 2010-08-05 11:37:06 +00:00
parent 42a2c1a03a
commit 912b4e0cb7
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ PUBLIC struct inode *alloc_inode(struct inode *parent, mode_t bits)
/* Acquire an inode from the bit map. */
b = alloc_inode_bit(sp, parent, (bits & I_TYPE) == I_DIRECTORY);
if (b == NO_BIT) {
err_code = ENFILE;
err_code = ENOSPC;
major = (int) (sp->s_dev >> MAJOR) & BYTE;
minor = (int) (sp->s_dev >> MINOR) & BYTE;
ext2_debug("Out of i-nodes on device %d/%d\n", major, minor);

View File

@ -273,7 +273,7 @@ PUBLIC struct inode *alloc_inode(dev_t dev, mode_t bits)
/* Acquire an inode from the bit map. */
b = alloc_bit(sp, IMAP, sp->s_isearch);
if (b == NO_BIT) {
err_code = ENFILE;
err_code = ENOSPC;
major = (int) (sp->s_dev >> MAJOR) & BYTE;
minor = (int) (sp->s_dev >> MINOR) & BYTE;
printf("Out of i-nodes on device %d/%d\n", major, minor);