Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
		}