Skip to content

Commit

Permalink
[PATCH] Fix return value in reiserfs allocator
Browse files Browse the repository at this point in the history
Make reiserfs correctly return EDQUOT when the allocation failed due to
quotas (so far we just returned ENOSPC).

Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jankara authored and Linus Torvalds committed Nov 9, 2005
1 parent 41a34a4 commit 0ad74ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/reiserfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0ad74ff

Please sign in to comment.