commit 5afae177b1a0466b6bad92241b71a68952a48d92
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date: Fri Nov 16 13:46:47 2007 -0500
Unionfs: mmap fixes to unionfs_writepage
Don't call unlock_page on lower_page unless lower ->writepage failed.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
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);
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs