diff options
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 558ce0312421..6cf3d8d18369 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -629,11 +629,10 @@ restart_all: | |||
629 | } | 629 | } |
630 | 630 | ||
631 | restarted_transaction: | 631 | restarted_transaction: |
632 | if (vfs_dq_alloc_space_nodirty(inode, ocfs2_clusters_to_bytes(osb->sb, | 632 | status = dquot_alloc_space_nodirty(inode, |
633 | clusters_to_add))) { | 633 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_add)); |
634 | status = -EDQUOT; | 634 | if (status) |
635 | goto leave; | 635 | goto leave; |
636 | } | ||
637 | did_quota = 1; | 636 | did_quota = 1; |
638 | 637 | ||
639 | /* reserve a write to the file entry early on - that we if we | 638 | /* reserve a write to the file entry early on - that we if we |
@@ -674,7 +673,7 @@ restarted_transaction: | |||
674 | clusters_to_add -= (OCFS2_I(inode)->ip_clusters - prev_clusters); | 673 | clusters_to_add -= (OCFS2_I(inode)->ip_clusters - prev_clusters); |
675 | spin_unlock(&OCFS2_I(inode)->ip_lock); | 674 | spin_unlock(&OCFS2_I(inode)->ip_lock); |
676 | /* Release unused quota reservation */ | 675 | /* Release unused quota reservation */ |
677 | vfs_dq_free_space(inode, | 676 | dquot_free_space(inode, |
678 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_add)); | 677 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_add)); |
679 | did_quota = 0; | 678 | did_quota = 0; |
680 | 679 | ||
@@ -710,7 +709,7 @@ restarted_transaction: | |||
710 | 709 | ||
711 | leave: | 710 | leave: |
712 | if (status < 0 && did_quota) | 711 | if (status < 0 && did_quota) |
713 | vfs_dq_free_space(inode, | 712 | dquot_free_space(inode, |
714 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_add)); | 713 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_add)); |
715 | if (handle) { | 714 | if (handle) { |
716 | ocfs2_commit_trans(osb, handle); | 715 | ocfs2_commit_trans(osb, handle); |