diff options
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index d17bdc718f74..20538dd832a4 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -5712,7 +5712,7 @@ int ocfs2_remove_btree_range(struct inode *inode, | |||
5712 | goto out; | 5712 | goto out; |
5713 | } | 5713 | } |
5714 | 5714 | ||
5715 | vfs_dq_free_space_nodirty(inode, | 5715 | dquot_free_space_nodirty(inode, |
5716 | ocfs2_clusters_to_bytes(inode->i_sb, len)); | 5716 | ocfs2_clusters_to_bytes(inode->i_sb, len)); |
5717 | 5717 | ||
5718 | ret = ocfs2_remove_extent(handle, et, cpos, len, meta_ac, dealloc); | 5718 | ret = ocfs2_remove_extent(handle, et, cpos, len, meta_ac, dealloc); |
@@ -6935,7 +6935,7 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
6935 | goto bail; | 6935 | goto bail; |
6936 | } | 6936 | } |
6937 | 6937 | ||
6938 | vfs_dq_free_space_nodirty(inode, | 6938 | dquot_free_space_nodirty(inode, |
6939 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_del)); | 6939 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_del)); |
6940 | spin_lock(&OCFS2_I(inode)->ip_lock); | 6940 | spin_lock(&OCFS2_I(inode)->ip_lock); |
6941 | OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters) - | 6941 | OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters) - |
@@ -7300,11 +7300,10 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, | |||
7300 | unsigned int page_end; | 7300 | unsigned int page_end; |
7301 | u64 phys; | 7301 | u64 phys; |
7302 | 7302 | ||
7303 | if (vfs_dq_alloc_space_nodirty(inode, | 7303 | ret = dquot_alloc_space_nodirty(inode, |
7304 | ocfs2_clusters_to_bytes(osb->sb, 1))) { | 7304 | ocfs2_clusters_to_bytes(osb->sb, 1)); |
7305 | ret = -EDQUOT; | 7305 | if (ret) |
7306 | goto out_commit; | 7306 | goto out_commit; |
7307 | } | ||
7308 | did_quota = 1; | 7307 | did_quota = 1; |
7309 | 7308 | ||
7310 | ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off, | 7309 | ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off, |
@@ -7380,7 +7379,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, | |||
7380 | 7379 | ||
7381 | out_commit: | 7380 | out_commit: |
7382 | if (ret < 0 && did_quota) | 7381 | if (ret < 0 && did_quota) |
7383 | vfs_dq_free_space_nodirty(inode, | 7382 | dquot_free_space_nodirty(inode, |
7384 | ocfs2_clusters_to_bytes(osb->sb, 1)); | 7383 | ocfs2_clusters_to_bytes(osb->sb, 1)); |
7385 | 7384 | ||
7386 | ocfs2_commit_trans(osb, handle); | 7385 | ocfs2_commit_trans(osb, handle); |