Skip to content

Commit

Permalink
f2fs: fix omitting to update inode page
Browse files Browse the repository at this point in the history
The f2fs_set_link updates its parent inode number, so we should sync this to
the inode block.
Otherwise, the data can be lost after sudden-power-off.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
  • Loading branch information
Jaegeuk Kim committed Aug 27, 2013
1 parent 65985d9 commit 8cb8268
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/f2fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
else
release_orphan_inode(sbi);

update_inode_page(old_inode);
update_inode_page(new_inode);
} else {
err = f2fs_add_link(new_dentry, old_inode);
Expand Down

0 comments on commit 8cb8268

Please sign in to comment.