[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 <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user