提交 0ad74ffa 编写于 作者: J Jan Kara 提交者: 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: NJan Kara <jack@suse.cz>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册