diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index c29bcf4cfca139b68e83eaa35253cd562c5ba63c..e54489b970ae0297e98a3cc43d5a4da9af9a4774 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1177,8 +1177,10 @@ static int f2fs_write_data_page(struct page *page, goto redirty_out; if (f2fs_is_drop_cache(inode)) goto out; - if (f2fs_is_volatile_file(inode) && !wbc->for_reclaim && - available_free_memory(sbi, BASE_CHECK)) + /* we should not write 0'th page having journal header */ + if (f2fs_is_volatile_file(inode) && (!page->index || + (!wbc->for_reclaim && + available_free_memory(sbi, BASE_CHECK)))) goto redirty_out; /* Dentry blocks are controlled by checkpoint */