Unionfs: minor cleanup in writepage
authorHugh Dickins <hugh@veritas.com>
Mon, 19 Nov 2007 01:26:05 +0000 (20:26 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 11 Nov 2014 02:37:09 +0000 (21:37 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/mmap.c

index 4918f777d54a61a95818b274580734ebe34d598b..1e10280a767ea7729b469b2d7888a67421de75b2 100644 (file)
@@ -56,6 +56,7 @@ static int unionfs_writepage(struct page *page, struct writeback_control *wbc)
        copy_highpage(lower_page, page);
        flush_dcache_page(lower_page);
        SetPageUptodate(lower_page);
+       set_page_dirty(lower_page);
 
        /*
         * Call lower writepage (expects locked page).  However, if we are
@@ -66,12 +67,11 @@ static int unionfs_writepage(struct page *page, struct writeback_control *wbc)
         * success.
         */
        if (wbc->for_reclaim) {
-               set_page_dirty(lower_page);
                unlock_page(lower_page);
                goto out_release;
        }
+
        BUG_ON(!lower_mapping->a_ops->writepage);
-       set_page_dirty(lower_page);
        clear_page_dirty_for_io(lower_page); /* emulate VFS behavior */
        err = lower_mapping->a_ops->writepage(lower_page, wbc);
        if (err < 0)