From 5def507ec35f965120da33bd9c3b9da177d2ed00 Mon Sep 17 00:00:00 2001 From: Sunil Mushran Date: Wed, 16 Jul 2008 17:22:22 -0700 Subject: [PATCH] --- yaml --- r: 107390 b: refs/heads/master c: 961cecbee6786f4b1f1b8f695e87045b583f9f49 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/aops.c | 29 +++++++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 2af7679637e1..b3bc09cc5fc1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 539d8264093560b917ee3afe4c7f74e5da09d6a5 +refs/heads/master: 961cecbee6786f4b1f1b8f695e87045b583f9f49 diff --git a/trunk/fs/ocfs2/aops.c b/trunk/fs/ocfs2/aops.c index 1db080135c6d..506c24fb5078 100644 --- a/trunk/fs/ocfs2/aops.c +++ b/trunk/fs/ocfs2/aops.c @@ -1073,12 +1073,15 @@ static void ocfs2_write_failure(struct inode *inode, for(i = 0; i < wc->w_num_pages; i++) { tmppage = wc->w_pages[i]; - if (ocfs2_should_order_data(inode)) - walk_page_buffers(wc->w_handle, page_buffers(tmppage), - from, to, NULL, - ocfs2_journal_dirty_data); - - block_commit_write(tmppage, from, to); + if (page_has_buffers(tmppage)) { + if (ocfs2_should_order_data(inode)) + walk_page_buffers(wc->w_handle, + page_buffers(tmppage), + from, to, NULL, + ocfs2_journal_dirty_data); + + block_commit_write(tmppage, from, to); + } } } @@ -1901,12 +1904,14 @@ int ocfs2_write_end_nolock(struct address_space *mapping, to = PAGE_CACHE_SIZE; } - if (ocfs2_should_order_data(inode)) - walk_page_buffers(wc->w_handle, page_buffers(tmppage), - from, to, NULL, - ocfs2_journal_dirty_data); - - block_commit_write(tmppage, from, to); + if (page_has_buffers(tmppage)) { + if (ocfs2_should_order_data(inode)) + walk_page_buffers(wc->w_handle, + page_buffers(tmppage), + from, to, NULL, + ocfs2_journal_dirty_data); + block_commit_write(tmppage, from, to); + } } out_write_size: