diff options
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r-- | fs/ocfs2/aops.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index fa43810e5970..f37f25c931f5 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -930,18 +930,11 @@ static void ocfs2_write_failure(struct inode *inode, | |||
930 | loff_t user_pos, unsigned user_len) | 930 | loff_t user_pos, unsigned user_len) |
931 | { | 931 | { |
932 | int i; | 932 | int i; |
933 | unsigned from, to; | 933 | unsigned from = user_pos & (PAGE_CACHE_SIZE - 1), |
934 | to = user_pos + user_len; | ||
934 | struct page *tmppage; | 935 | struct page *tmppage; |
935 | 936 | ||
936 | ocfs2_zero_new_buffers(wc->w_target_page, user_pos, user_len); | 937 | ocfs2_zero_new_buffers(wc->w_target_page, from, to); |
937 | |||
938 | if (wc->w_large_pages) { | ||
939 | from = wc->w_target_from; | ||
940 | to = wc->w_target_to; | ||
941 | } else { | ||
942 | from = 0; | ||
943 | to = PAGE_CACHE_SIZE; | ||
944 | } | ||
945 | 938 | ||
946 | for(i = 0; i < wc->w_num_pages; i++) { | 939 | for(i = 0; i < wc->w_num_pages; i++) { |
947 | tmppage = wc->w_pages[i]; | 940 | tmppage = wc->w_pages[i]; |
@@ -991,9 +984,6 @@ static int ocfs2_prepare_page_for_write(struct inode *inode, u64 *p_blkno, | |||
991 | map_from = cluster_start; | 984 | map_from = cluster_start; |
992 | map_to = cluster_end; | 985 | map_to = cluster_end; |
993 | } | 986 | } |
994 | |||
995 | wc->w_target_from = map_from; | ||
996 | wc->w_target_to = map_to; | ||
997 | } else { | 987 | } else { |
998 | /* | 988 | /* |
999 | * If we haven't allocated the new page yet, we | 989 | * If we haven't allocated the new page yet, we |