diff options
author | Filipe David Borba Manana <fdmanana@gmail.com> | 2013-08-05 15:25:12 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 12:04:55 (GMT) |
commit | 09fb99a696412ae0fceeafc06c987903416503b9 (patch) | |
tree | c541ed0dc8707e9b5a183b637e7eb58a1306095c /fs/btrfs/backref.c | |
parent | ada9af215cf7ce663ff3bf9d255923d75b57a4ce (diff) | |
download | linux-fsl-qoriq-09fb99a696412ae0fceeafc06c987903416503b9.tar.xz |
Btrfs: return ENOSPC when target space is full
In extent-tree.c:do_chunk_alloc(), early on we returned 0 (success)
when the target space was full and when chunk allocation is needed.
However, later on in that same function we return ENOSPC if
btrfs_alloc_chunk() fails (and chunk allocation was needed) and
set the space's full flag.
This was inconsistent, as -ENOSPC should be returned if the space
is full and a chunk allocation needs to performed. If the space is
full but no chunk allocation is needed, just return 0 (success).
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/backref.c')
0 files changed, 0 insertions, 0 deletions