GIT: unionfs2-2.6.27.y: Unionfs: prevent multiple writers to lower_page

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:17:29 EDT 2010


commit 458cf20eb704b29730d73c6c0cbc0c4d7eaabd51
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date:   Sun Nov 25 14:51:56 2007 -0500

    Unionfs: prevent multiple writers to lower_page
    
    Without this patch, the LTP fs test "rwtest04" triggers a
    BUG_ON(PageWriteback(page)) in fs/buffer.c:1706.
    
    CC: Hugh Dickins <hugh at veritas.com>
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

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;


More information about the unionfs-cvs mailing list