diff options
Diffstat (limited to 'fs/ocfs2/refcounttree.c')
-rw-r--r-- | fs/ocfs2/refcounttree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 73a11ccfd4c2..efdd75607406 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c | |||
@@ -2960,7 +2960,7 @@ static int ocfs2_duplicate_clusters_by_page(handle_t *handle, | |||
2960 | if (map_end & (PAGE_CACHE_SIZE - 1)) | 2960 | if (map_end & (PAGE_CACHE_SIZE - 1)) |
2961 | to = map_end & (PAGE_CACHE_SIZE - 1); | 2961 | to = map_end & (PAGE_CACHE_SIZE - 1); |
2962 | 2962 | ||
2963 | page = grab_cache_page(mapping, page_index); | 2963 | page = find_or_create_page(mapping, page_index, GFP_NOFS); |
2964 | 2964 | ||
2965 | /* | 2965 | /* |
2966 | * In case PAGE_CACHE_SIZE <= CLUSTER_SIZE, This page | 2966 | * In case PAGE_CACHE_SIZE <= CLUSTER_SIZE, This page |
@@ -3179,7 +3179,8 @@ static int ocfs2_cow_sync_writeback(struct super_block *sb, | |||
3179 | if (map_end > end) | 3179 | if (map_end > end) |
3180 | map_end = end; | 3180 | map_end = end; |
3181 | 3181 | ||
3182 | page = grab_cache_page(context->inode->i_mapping, page_index); | 3182 | page = find_or_create_page(context->inode->i_mapping, |
3183 | page_index, GFP_NOFS); | ||
3183 | BUG_ON(!page); | 3184 | BUG_ON(!page); |
3184 | 3185 | ||
3185 | wait_on_page_writeback(page); | 3186 | wait_on_page_writeback(page); |
@@ -4200,8 +4201,9 @@ static int __ocfs2_reflink(struct dentry *old_dentry, | |||
4200 | goto out; | 4201 | goto out; |
4201 | } | 4202 | } |
4202 | 4203 | ||
4203 | mutex_lock(&new_inode->i_mutex); | 4204 | mutex_lock_nested(&new_inode->i_mutex, I_MUTEX_CHILD); |
4204 | ret = ocfs2_inode_lock(new_inode, &new_bh, 1); | 4205 | ret = ocfs2_inode_lock_nested(new_inode, &new_bh, 1, |
4206 | OI_LS_REFLINK_TARGET); | ||
4205 | if (ret) { | 4207 | if (ret) { |
4206 | mlog_errno(ret); | 4208 | mlog_errno(ret); |
4207 | goto out_unlock; | 4209 | goto out_unlock; |