diff options
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r-- | fs/ocfs2/aops.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 4c2a6d282c4d..21441ddb5506 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -1764,10 +1764,11 @@ int ocfs2_write_begin_nolock(struct address_space *mapping, | |||
1764 | 1764 | ||
1765 | wc->w_handle = handle; | 1765 | wc->w_handle = handle; |
1766 | 1766 | ||
1767 | if (clusters_to_alloc && vfs_dq_alloc_space_nodirty(inode, | 1767 | if (clusters_to_alloc) { |
1768 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc))) { | 1768 | ret = dquot_alloc_space_nodirty(inode, |
1769 | ret = -EDQUOT; | 1769 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); |
1770 | goto out_commit; | 1770 | if (ret) |
1771 | goto out_commit; | ||
1771 | } | 1772 | } |
1772 | /* | 1773 | /* |
1773 | * We don't want this to fail in ocfs2_write_end(), so do it | 1774 | * We don't want this to fail in ocfs2_write_end(), so do it |
@@ -1810,7 +1811,7 @@ success: | |||
1810 | return 0; | 1811 | return 0; |
1811 | out_quota: | 1812 | out_quota: |
1812 | if (clusters_to_alloc) | 1813 | if (clusters_to_alloc) |
1813 | vfs_dq_free_space(inode, | 1814 | dquot_free_space(inode, |
1814 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); | 1815 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); |
1815 | out_commit: | 1816 | out_commit: |
1816 | ocfs2_commit_trans(osb, handle); | 1817 | ocfs2_commit_trans(osb, handle); |