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 7e9df11260f4..7d04c171567d 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -1763,10 +1763,11 @@ int ocfs2_write_begin_nolock(struct address_space *mapping, | |||
1763 | 1763 | ||
1764 | wc->w_handle = handle; | 1764 | wc->w_handle = handle; |
1765 | 1765 | ||
1766 | if (clusters_to_alloc && vfs_dq_alloc_space_nodirty(inode, | 1766 | if (clusters_to_alloc) { |
1767 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc))) { | 1767 | ret = dquot_alloc_space_nodirty(inode, |
1768 | ret = -EDQUOT; | 1768 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); |
1769 | goto out_commit; | 1769 | if (ret) |
1770 | goto out_commit; | ||
1770 | } | 1771 | } |
1771 | /* | 1772 | /* |
1772 | * We don't want this to fail in ocfs2_write_end(), so do it | 1773 | * We don't want this to fail in ocfs2_write_end(), so do it |
@@ -1809,7 +1810,7 @@ success: | |||
1809 | return 0; | 1810 | return 0; |
1810 | out_quota: | 1811 | out_quota: |
1811 | if (clusters_to_alloc) | 1812 | if (clusters_to_alloc) |
1812 | vfs_dq_free_space(inode, | 1813 | dquot_free_space(inode, |
1813 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); | 1814 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); |
1814 | out_commit: | 1815 | out_commit: |
1815 | ocfs2_commit_trans(osb, handle); | 1816 | ocfs2_commit_trans(osb, handle); |