From: Josef Bacik Date: Fri, 13 Jan 2012 00:10:12 +0000 (-0500) Subject: Btrfs: release space on error in page_mkwrite X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ec39e180fd3188c983c94603634bfcd019f42ae7;p=linux-beck.git Btrfs: release space on error in page_mkwrite 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 Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 946a7f1b3295..85fd86ea9830 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6488,8 +6488,8 @@ out_unlock: 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; }