Skip to content

Commit

Permalink
Btrfs: release space on error in page_mkwrite
Browse files Browse the repository at this point in the history
If updating the inode gave us an ENOSPC we were just returning in page_mkwrite,
which is a problem since we make our reservation right before trying to update
the inode, so fix the out label so that we actually free our reservation.
Thanks,

Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
Josef Bacik authored and chrismason-xx committed Jan 16, 2012
1 parent f70a9a6 commit ec39e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -6488,8 +6488,8 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
if (!ret)
return VM_FAULT_LOCKED;
unlock_page(page);
btrfs_delalloc_release_space(inode, PAGE_CACHE_SIZE);
out:
btrfs_delalloc_release_space(inode, PAGE_CACHE_SIZE);
return ret;
}

Expand Down

0 comments on commit ec39e18

Please sign in to comment.