From: Jan Kara Date: Wed, 9 Nov 2005 05:34:58 +0000 (-0800) Subject: [PATCH] Fix return value in reiserfs allocator X-Git-Tag: v3.12-rc1~40888 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ad74ffa90fb20b4132ae6e67e473f24621c6af2;p=kernel%2Fkernel-generic.git [PATCH] Fix return value in reiserfs allocator Make reiserfs correctly return EDQUOT when the allocation failed due to quotas (so far we just returned ENOSPC). Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index c20babd..7892a86 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c @@ -251,12 +251,12 @@ static int reiserfs_allocate_blocks_for_region(struct reiserfs_transaction_handl blocks_to_allocate, blocks_to_allocate); if (res != CARRY_ON) { - res = -ENOSPC; + res = res == QUOTA_EXCEEDED ? -EDQUOT : -ENOSPC; pathrelse(&path); goto error_exit; } } else { - res = -ENOSPC; + res = res == QUOTA_EXCEEDED ? -EDQUOT : -ENOSPC; pathrelse(&path); goto error_exit; }