Commit 0ad74ffa authored by Jan Kara's avatar Jan Kara Committed by Linus Torvalds

[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: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 41a34a4f
...@@ -251,12 +251,12 @@ static int reiserfs_allocate_blocks_for_region(struct reiserfs_transaction_handl ...@@ -251,12 +251,12 @@ static int reiserfs_allocate_blocks_for_region(struct reiserfs_transaction_handl
blocks_to_allocate, blocks_to_allocate,
blocks_to_allocate); blocks_to_allocate);
if (res != CARRY_ON) { if (res != CARRY_ON) {
res = -ENOSPC; res = res == QUOTA_EXCEEDED ? -EDQUOT : -ENOSPC;
pathrelse(&path); pathrelse(&path);
goto error_exit; goto error_exit;
} }
} else { } else {
res = -ENOSPC; res = res == QUOTA_EXCEEDED ? -EDQUOT : -ENOSPC;
pathrelse(&path); pathrelse(&path);
goto error_exit; goto error_exit;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment