diff options
-rw-r--r-- | fs/btrfs/extent-tree.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 06a5ee29b446..4d08ed79405d 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -3474,6 +3474,8 @@ again: | |||
3474 | if (ret < 0) | 3474 | if (ret < 0) |
3475 | goto out; | 3475 | goto out; |
3476 | 3476 | ||
3477 | ret = 0; | ||
3478 | |||
3477 | /* | 3479 | /* |
3478 | * So if we were overcommitted it's possible that somebody else flushed | 3480 | * So if we were overcommitted it's possible that somebody else flushed |
3479 | * out enough space and we simply didn't have enough space to reclaim, | 3481 | * out enough space and we simply didn't have enough space to reclaim, |
@@ -3496,10 +3498,13 @@ again: | |||
3496 | goto out; | 3498 | goto out; |
3497 | 3499 | ||
3498 | ret = -EAGAIN; | 3500 | ret = -EAGAIN; |
3499 | if (trans || committed) | 3501 | if (trans) |
3500 | goto out; | 3502 | goto out; |
3501 | 3503 | ||
3502 | ret = -ENOSPC; | 3504 | ret = -ENOSPC; |
3505 | if (committed) | ||
3506 | goto out; | ||
3507 | |||
3503 | trans = btrfs_join_transaction(root); | 3508 | trans = btrfs_join_transaction(root); |
3504 | if (IS_ERR(trans)) | 3509 | if (IS_ERR(trans)) |
3505 | goto out; | 3510 | goto out; |