summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-01-21 13:32:12 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-01-22 18:40:34 +0900
commita18ff063406dd6aec41fda598eabe2691007a30d (patch)
treee38d3496b818e75bde2cbb18c949efb8e906c713 /fs/f2fs/namei.c
parent6c311ec6c2d9e015d454b4e3fda8008b5bebf316 (diff)
downloadop-kernel-dev-a18ff063406dd6aec41fda598eabe2691007a30d.zip
op-kernel-dev-a18ff063406dd6aec41fda598eabe2691007a30d.tar.gz
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/namei.c')
-rw-r--r--fs/f2fs/namei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index a68838d..3d32f29 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -430,6 +430,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
if (old_dir_entry)
drop_nlink(new_inode);
drop_nlink(new_inode);
+ mark_inode_dirty(new_inode);
if (!new_inode->i_nlink)
add_orphan_inode(sbi, new_inode->i_ino);
@@ -459,11 +460,13 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
f2fs_set_link(old_inode, old_dir_entry,
old_dir_page, new_dir);
F2FS_I(old_inode)->i_pino = new_dir->i_ino;
+ update_inode_page(old_inode);
} else {
kunmap(old_dir_page);
f2fs_put_page(old_dir_page, 0);
}
drop_nlink(old_dir);
+ mark_inode_dirty(old_dir);
update_inode_page(old_dir);
}
OpenPOWER on IntegriCloud