GIT: unionfs2-2.6.27.y: Unionfs: mmap fixes to unionfs_writepage
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:52 EDT 2010
commit 28c8ddaf6825ef7d0cc2243bb9de78b6099270bb
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date: Tue Jul 31 19:25:55 2007 -0400
Unionfs: mmap fixes to unionfs_writepage
Don't call unlock_page on lower_page unless lower ->writepage failed.
Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c
index 145ba5b..8b04a46 100644
--- a/fs/unionfs/mmap.c
+++ b/fs/unionfs/mmap.c
@@ -110,8 +110,9 @@ static int unionfs_writepage(struct page *page, struct writeback_control *wbc)
err = lower_inode->i_mapping->a_ops->writepage(lower_page, wbc);
wbc->for_writepages = saved_for_writepages; /* restore value */
- /* b/c find_lock_page locked it */
- unlock_page(lower_page);
+ /* b/c find_lock_page locked it and ->writepage unlocks on success */
+ if (err)
+ unlock_page(lower_page);
/* b/c grab_cache_page increased refcnt */
page_cache_release(lower_page);
More information about the unionfs-cvs
mailing list