[PATCH 14/16] Unionfs: prevent multiple writers to lower_page

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Erez Zadok
Date: Monday, November 26, 2007 - 9:44 am

Without this patch, the LTP fs test "rwtest04" triggers a
BUG_ON(PageWriteback(page)) in fs/buffer.c:1706.

CC: Hugh Dickins <hugh@veritas.com>

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
---
 fs/unionfs/mmap.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c
index 623a913..ea5ef3d 100644
--- a/fs/unionfs/mmap.c
+++ b/fs/unionfs/mmap.c
@@ -73,6 +73,7 @@ static int unionfs_writepage(struct page *page, struct writeback_control *wbc)
 
 	BUG_ON(!lower_mapping->a_ops->writepage);
 	clear_page_dirty_for_io(lower_page); /* emulate VFS behavior */
+	wait_on_page_writeback(lower_page); /* prevent multiple writers */
 	err = lower_mapping->a_ops->writepage(lower_page, wbc);
 	if (err < 0)
 		goto out_release;
-- 
1.5.2.2

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL -mm] 00/16 Unionfs updates/fixes/cleanups, Erez Zadok, (Mon Nov 26, 9:43 am)
[PATCH 02/16] Unionfs: minor cleanup in writepage, Erez Zadok, (Mon Nov 26, 9:43 am)
[PATCH 11/16] Unionfs: update times in setattr, Erez Zadok, (Mon Nov 26, 9:44 am)
[PATCH 12/16] Unionfs: reintroduce a bmap method, Erez Zadok, (Mon Nov 26, 9:44 am)
[PATCH 13/16] Unionfs: support splice(2), Erez Zadok, (Mon Nov 26, 9:44 am)
[PATCH 14/16] Unionfs: prevent multiple writers to lower_page, Erez Zadok, (Mon Nov 26, 9:44 am)