From 85630d3d58daf905ec238e157e990f9e9ba8126c Mon Sep 17 00:00:00 2001 From: Hugh Dickins Date: Sun, 18 Nov 2007 20:26:05 -0500 Subject: [PATCH] Unionfs: minor cleanup in writepage Signed-off-by: Erez Zadok --- fs/unionfs/mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c index 4918f777d54..1e10280a767 100644 --- a/fs/unionfs/mmap.c +++ b/fs/unionfs/mmap.c @@ -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) -- 2.43.0