diff options
author | Jan Kara <jack@suse.cz> | 2005-11-09 00:34:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:55:58 -0500 |
commit | 0ad74ffa90fb20b4132ae6e67e473f24621c6af2 (patch) | |
tree | 458abb41b477579041674d02131ae295fa7d622c /fs/reiserfs | |
parent | 41a34a4fe1d4478b1c8b6b6ea634ab1adb156885 (diff) |
[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>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index c20babd6216d..7892a865b58a 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 | |||
251 | blocks_to_allocate, | 251 | blocks_to_allocate, |
252 | blocks_to_allocate); | 252 | blocks_to_allocate); |
253 | if (res != CARRY_ON) { | 253 | if (res != CARRY_ON) { |
254 | res = -ENOSPC; | 254 | res = res == QUOTA_EXCEEDED ? -EDQUOT : -ENOSPC; |
255 | pathrelse(&path); | 255 | pathrelse(&path); |
256 | goto error_exit; | 256 | goto error_exit; |
257 | } | 257 | } |
258 | } else { | 258 | } else { |
259 | res = -ENOSPC; | 259 | res = res == QUOTA_EXCEEDED ? -EDQUOT : -ENOSPC; |
260 | pathrelse(&path); | 260 | pathrelse(&path); |
261 | goto error_exit; | 261 | goto error_exit; |
262 | } | 262 | } |