提交 ec39e180 编写于 作者: J Josef Bacik 提交者: Chris Mason

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: NJosef Bacik <josef@redhat.com>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 f70a9a6b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册