mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch] quota: fix error code for ext2_new_inode()
@ 2006-01-25  6:40 Herbert Poetzl
  2006-01-25 12:19 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Herbert Poetzl @ 2006-01-25  6:40 UTC (permalink / raw)
  To: Jan Kara, Linus Torvalds, Andrew Morton; +Cc: Linux Kernel ML


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

Signed-off-by: Herbert Pötzl <herbert@13thfloor.at>

--- ./fs/ext2/ialloc.c.orig	2006-01-03 17:29:56 +0100
+++ ./fs/ext2/ialloc.c	2006-01-25 07:26:42 +0100
@@ -605,7 +605,7 @@ got:
 	insert_inode_hash(inode);
 
 	if (DQUOT_ALLOC_INODE(inode)) {
-		err = -ENOSPC;
+		err = -EDQUOT;
 		goto fail_drop;
 	}
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch] quota: fix error code for ext2_new_inode()
  2006-01-25  6:40 [Patch] quota: fix error code for ext2_new_inode() Herbert Poetzl
@ 2006-01-25 12:19 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2006-01-25 12:19 UTC (permalink / raw)
  To: Herbert Poetzl, Linus Torvalds, Andrew Morton, Linux Kernel ML

  Hi,

> 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


> Signed-off-by: Herbert Pötzl <herbert@13thfloor.at>
  Acked-by: Jan Kara <jack@suse.cz>

> --- ./fs/ext2/ialloc.c.orig	2006-01-03 17:29:56 +0100
> +++ ./fs/ext2/ialloc.c	2006-01-25 07:26:42 +0100
> @@ -605,7 +605,7 @@ got:
>  	insert_inode_hash(inode);
>  
>  	if (DQUOT_ALLOC_INODE(inode)) {
> -		err = -ENOSPC;
> +		err = -EDQUOT;
>  		goto fail_drop;
>  	}
>  
> 
-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-25 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-25  6:40 [Patch] quota: fix error code for ext2_new_inode() Herbert Poetzl
2006-01-25 12:19 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®