diff options
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 38a42f5d59ff..9f8bd913c51e 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -1050,7 +1050,8 @@ static int ocfs2_create_new_meta_bhs(handle_t *handle, | |||
1050 | strcpy(eb->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE); | 1050 | strcpy(eb->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE); |
1051 | eb->h_blkno = cpu_to_le64(first_blkno); | 1051 | eb->h_blkno = cpu_to_le64(first_blkno); |
1052 | eb->h_fs_generation = cpu_to_le32(osb->fs_generation); | 1052 | eb->h_fs_generation = cpu_to_le32(osb->fs_generation); |
1053 | eb->h_suballoc_slot = cpu_to_le16(osb->slot_num); | 1053 | eb->h_suballoc_slot = |
1054 | cpu_to_le16(meta_ac->ac_alloc_slot); | ||
1054 | eb->h_suballoc_bit = cpu_to_le16(suballoc_bit_start); | 1055 | eb->h_suballoc_bit = cpu_to_le16(suballoc_bit_start); |
1055 | eb->h_list.l_count = | 1056 | eb->h_list.l_count = |
1056 | cpu_to_le16(ocfs2_extent_recs_per_eb(osb->sb)); | 1057 | cpu_to_le16(ocfs2_extent_recs_per_eb(osb->sb)); |
@@ -1765,9 +1766,9 @@ set_and_inc: | |||
1765 | * | 1766 | * |
1766 | * The array index of the subtree root is passed back. | 1767 | * The array index of the subtree root is passed back. |
1767 | */ | 1768 | */ |
1768 | static int ocfs2_find_subtree_root(struct ocfs2_extent_tree *et, | 1769 | int ocfs2_find_subtree_root(struct ocfs2_extent_tree *et, |
1769 | struct ocfs2_path *left, | 1770 | struct ocfs2_path *left, |
1770 | struct ocfs2_path *right) | 1771 | struct ocfs2_path *right) |
1771 | { | 1772 | { |
1772 | int i = 0; | 1773 | int i = 0; |
1773 | 1774 | ||
@@ -2398,7 +2399,7 @@ static int ocfs2_leftmost_rec_contains(struct ocfs2_extent_list *el, u32 cpos) | |||
2398 | * | 2399 | * |
2399 | * The array is assumed to be large enough to hold an entire path (tree depth). | 2400 | * The array is assumed to be large enough to hold an entire path (tree depth). |
2400 | * | 2401 | * |
2401 | * Upon succesful return from this function: | 2402 | * Upon successful return from this function: |
2402 | * | 2403 | * |
2403 | * - The 'right_path' array will contain a path to the leaf block | 2404 | * - The 'right_path' array will contain a path to the leaf block |
2404 | * whose range contains e_cpos. | 2405 | * whose range contains e_cpos. |
@@ -2872,8 +2873,8 @@ out: | |||
2872 | * This looks similar, but is subtly different to | 2873 | * This looks similar, but is subtly different to |
2873 | * ocfs2_find_cpos_for_left_leaf(). | 2874 | * ocfs2_find_cpos_for_left_leaf(). |
2874 | */ | 2875 | */ |
2875 | static int ocfs2_find_cpos_for_right_leaf(struct super_block *sb, | 2876 | int ocfs2_find_cpos_for_right_leaf(struct super_block *sb, |
2876 | struct ocfs2_path *path, u32 *cpos) | 2877 | struct ocfs2_path *path, u32 *cpos) |
2877 | { | 2878 | { |
2878 | int i, j, ret = 0; | 2879 | int i, j, ret = 0; |
2879 | u64 blkno; | 2880 | u64 blkno; |
@@ -5712,7 +5713,7 @@ int ocfs2_remove_btree_range(struct inode *inode, | |||
5712 | goto out; | 5713 | goto out; |
5713 | } | 5714 | } |
5714 | 5715 | ||
5715 | vfs_dq_free_space_nodirty(inode, | 5716 | dquot_free_space_nodirty(inode, |
5716 | ocfs2_clusters_to_bytes(inode->i_sb, len)); | 5717 | ocfs2_clusters_to_bytes(inode->i_sb, len)); |
5717 | 5718 | ||
5718 | ret = ocfs2_remove_extent(handle, et, cpos, len, meta_ac, dealloc); | 5719 | ret = ocfs2_remove_extent(handle, et, cpos, len, meta_ac, dealloc); |
@@ -6037,7 +6038,7 @@ static void ocfs2_truncate_log_worker(struct work_struct *work) | |||
6037 | if (status < 0) | 6038 | if (status < 0) |
6038 | mlog_errno(status); | 6039 | mlog_errno(status); |
6039 | else | 6040 | else |
6040 | ocfs2_init_inode_steal_slot(osb); | 6041 | ocfs2_init_steal_slots(osb); |
6041 | 6042 | ||
6042 | mlog_exit(status); | 6043 | mlog_exit(status); |
6043 | } | 6044 | } |
@@ -6935,7 +6936,7 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
6935 | goto bail; | 6936 | goto bail; |
6936 | } | 6937 | } |
6937 | 6938 | ||
6938 | vfs_dq_free_space_nodirty(inode, | 6939 | dquot_free_space_nodirty(inode, |
6939 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_del)); | 6940 | ocfs2_clusters_to_bytes(osb->sb, clusters_to_del)); |
6940 | spin_lock(&OCFS2_I(inode)->ip_lock); | 6941 | spin_lock(&OCFS2_I(inode)->ip_lock); |
6941 | OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters) - | 6942 | OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters) - |
@@ -7190,8 +7191,8 @@ int ocfs2_zero_range_for_truncate(struct inode *inode, handle_t *handle, | |||
7190 | * wait on them - the truncate_inode_pages() call later will | 7191 | * wait on them - the truncate_inode_pages() call later will |
7191 | * do that for us. | 7192 | * do that for us. |
7192 | */ | 7193 | */ |
7193 | ret = do_sync_mapping_range(inode->i_mapping, range_start, | 7194 | ret = filemap_fdatawrite_range(inode->i_mapping, range_start, |
7194 | range_end - 1, SYNC_FILE_RANGE_WRITE); | 7195 | range_end - 1); |
7195 | if (ret) | 7196 | if (ret) |
7196 | mlog_errno(ret); | 7197 | mlog_errno(ret); |
7197 | 7198 | ||
@@ -7300,11 +7301,10 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, | |||
7300 | unsigned int page_end; | 7301 | unsigned int page_end; |
7301 | u64 phys; | 7302 | u64 phys; |
7302 | 7303 | ||
7303 | if (vfs_dq_alloc_space_nodirty(inode, | 7304 | ret = dquot_alloc_space_nodirty(inode, |
7304 | ocfs2_clusters_to_bytes(osb->sb, 1))) { | 7305 | ocfs2_clusters_to_bytes(osb->sb, 1)); |
7305 | ret = -EDQUOT; | 7306 | if (ret) |
7306 | goto out_commit; | 7307 | goto out_commit; |
7307 | } | ||
7308 | did_quota = 1; | 7308 | did_quota = 1; |
7309 | 7309 | ||
7310 | ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off, | 7310 | ret = ocfs2_claim_clusters(osb, handle, data_ac, 1, &bit_off, |
@@ -7380,7 +7380,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, | |||
7380 | 7380 | ||
7381 | out_commit: | 7381 | out_commit: |
7382 | if (ret < 0 && did_quota) | 7382 | if (ret < 0 && did_quota) |
7383 | vfs_dq_free_space_nodirty(inode, | 7383 | dquot_free_space_nodirty(inode, |
7384 | ocfs2_clusters_to_bytes(osb->sb, 1)); | 7384 | ocfs2_clusters_to_bytes(osb->sb, 1)); |
7385 | 7385 | ||
7386 | ocfs2_commit_trans(osb, handle); | 7386 | ocfs2_commit_trans(osb, handle); |