From 4d7c8273197297596fd05aef518ef094ef12400f Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Tue, 18 Sep 2007 17:49:29 -0700 Subject: [PATCH] --- yaml --- r: 65095 b: refs/heads/master c: 5c26a7b70f89c36e8d9acc95cb896c3cd205fc8d h: refs/heads/master i: 65093: 5f32fc45b21733d42804d6d5fbd1fa1e5ab2b403 65091: 4225cbeb8418abe85d2aaefbe9537c92c405e42e 65087: 7b347bd23fd2373aa9d2c65f83641e7e4dc16abd v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/aops.c | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 7a8727176428..ef5ae1a82af0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: db56246c6980e376b02d2da568d119da71f82fb9 +refs/heads/master: 5c26a7b70f89c36e8d9acc95cb896c3cd205fc8d diff --git a/trunk/fs/ocfs2/aops.c b/trunk/fs/ocfs2/aops.c index fa43810e5970..f37f25c931f5 100644 --- a/trunk/fs/ocfs2/aops.c +++ b/trunk/fs/ocfs2/aops.c @@ -930,18 +930,11 @@ static void ocfs2_write_failure(struct inode *inode, loff_t user_pos, unsigned user_len) { int i; - unsigned from, to; + unsigned from = user_pos & (PAGE_CACHE_SIZE - 1), + to = user_pos + user_len; struct page *tmppage; - ocfs2_zero_new_buffers(wc->w_target_page, user_pos, user_len); - - if (wc->w_large_pages) { - from = wc->w_target_from; - to = wc->w_target_to; - } else { - from = 0; - to = PAGE_CACHE_SIZE; - } + ocfs2_zero_new_buffers(wc->w_target_page, from, to); for(i = 0; i < wc->w_num_pages; i++) { tmppage = wc->w_pages[i]; @@ -991,9 +984,6 @@ static int ocfs2_prepare_page_for_write(struct inode *inode, u64 *p_blkno, map_from = cluster_start; map_to = cluster_end; } - - wc->w_target_from = map_from; - wc->w_target_to = map_to; } else { /* * If we haven't allocated the new page yet, we