From: Jan Kara Date: Wed, 9 Nov 2005 05:34:58 +0000 (-0800) Subject: [PATCH] Fix return value in reiserfs allocator X-Git-Tag: v2.6.15-rc1~366 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ad74ffa90fb20b4132ae6e67e473f24621c6af2;p=linux-2.6 [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 c20babd621..7892a865b5 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; }