Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231755
b: refs/heads/master
c: d52a5b5
h: refs/heads/master
i:
  231753: 6be5e59
  231751: d3cc63f
v: v3
  • Loading branch information
Miao Xie authored and Chris Mason committed Jan 16, 2011
1 parent 368a3a1 commit 5f4d918
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 299a08b1c34f9397797946a0fa215c5fd145c5cf
refs/heads/master: d52a5b5f1fa40804f681cf9868d4a8f90661bdf3
9 changes: 7 additions & 2 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3162,8 +3162,12 @@ int btrfs_check_data_free_space(struct inode *inode, u64 bytes)
bytes + 2 * 1024 * 1024,
alloc_target, 0);
btrfs_end_transaction(trans, root);
if (ret < 0)
return ret;
if (ret < 0) {
if (ret != -ENOSPC)
return ret;
else
goto commit_trans;
}

if (!data_sinfo) {
btrfs_set_inode_space_info(root, inode);
Expand All @@ -3174,6 +3178,7 @@ int btrfs_check_data_free_space(struct inode *inode, u64 bytes)
spin_unlock(&data_sinfo->lock);

/* commit the current transaction and try again */
commit_trans:
if (!committed && !root->fs_info->open_ioctl_trans) {
committed = 1;
trans = btrfs_join_transaction(root, 1);
Expand Down

0 comments on commit 5f4d918

Please sign in to comment.