diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-01-21 08:32:12 +0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-01-22 13:40:34 +0400 |
commit | a18ff063406dd6aec41fda598eabe2691007a30d (patch) | |
tree | e38d3496b818e75bde2cbb18c949efb8e906c713 /fs/f2fs/data.c | |
parent | 6c311ec6c2d9e015d454b4e3fda8008b5bebf316 (diff) | |
download | linux-a18ff063406dd6aec41fda598eabe2691007a30d.tar.xz |
f2fs: call mark_inode_dirty to flush dirty pages
If a dentry page is updated, we should call mark_inode_dirty to add the inode
into the dirty list, so that its dentry pages are flushed to the disk.
Otherwise, the inode can be evicted without flush.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index f5fac16bc6e7..0ae558723506 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -249,6 +249,7 @@ int reserve_new_block(struct dnode_of_data *dn) __set_data_blkaddr(dn, NEW_ADDR); dn->data_blkaddr = NEW_ADDR; + mark_inode_dirty(dn->inode); sync_inode_page(dn); return 0; } @@ -564,7 +565,6 @@ repeat: i_size_write(inode, ((index + 1) << PAGE_CACHE_SHIFT)); /* Only the directory inode sets new_i_size */ set_inode_flag(F2FS_I(inode), FI_UPDATE_DIR); - mark_inode_dirty_sync(inode); } return page; @@ -1060,6 +1060,8 @@ static int f2fs_set_data_page_dirty(struct page *page) trace_f2fs_set_page_dirty(page, DATA); SetPageUptodate(page); + mark_inode_dirty(inode); + if (!PageDirty(page)) { __set_page_dirty_nobuffers(page); set_dirty_dir_page(inode, page); |