Skip to contentSkip to conversation

quota: fix error code for ext2_new_inode()

PATCH In review Herbert Poetzl 2 participants 2 messages Jan 25, 2006 ext2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 quota: fix error code for ext2_new_inode()

Hi Honza!

the quota check in ext2_new_inode() returns ENOSPC where IMHO it should return EDQUOT instead. here is a trivial patch to fix that ...

rationale: ext3, reiser, udf and ufs do similar checks and already return EDQUOT

best,
Herbert

fs/ext2/ialloc.c renamed from fs/ext2/ialloc.c.orig +1 -1
@@ -605,7 +605,7 @@ got:
 	insert_inode_hash(inode);
 
 	if (DQUOT_ALLOC_INODE(inode)) {
-		err = -ENOSPC;
+		err = -EDQUOT;
 		goto fail_drop;
 	}
 
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 6 lines

the quota check in ext2_new_inode() returns ENOSPC where IMHO it should return EDQUOT instead. here is a trivial patch to fix that ...

rationale: ext3, reiser, udf and ufs do similar checks and already return EDQUOT

Of course, you're right! Andrew please commit this one too.

Honza

Quoted 1 line
Quoted 12 lines
fs/ext2/ialloc.c renamed from fs/ext2/ialloc.c.orig +1 -1
@@ -605,7 +605,7 @@ got:
 	insert_inode_hash(inode);
 
 	if (DQUOT_ALLOC_INODE(inode)) {
-		err = -ENOSPC;
+		err = -EDQUOT;
 		goto fail_drop;
 	}
 
Signature · 2 lines
Jan Kara <[email protected]>
SuSE CR Labs