diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/dir.c | 3 | ||||
-rw-r--r-- | fs/f2fs/namei.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 28206109a293..07ad850bbf97 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -259,9 +259,6 @@ void f2fs_set_link(struct inode *dir, struct f2fs_dir_entry *de, dir->i_mtime = dir->i_ctime = CURRENT_TIME; mark_inode_dirty(dir); - /* update parent inode number before releasing dentry page */ - F2FS_I(inode)->i_pino = dir->i_ino; - f2fs_put_page(page, 1); } diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 575adac17f8b..a68838dae335 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -424,6 +424,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, } f2fs_set_link(new_dir, new_entry, new_page, old_inode); + F2FS_I(old_inode)->i_pino = new_dir->i_ino; new_inode->i_ctime = CURRENT_TIME; if (old_dir_entry) @@ -457,6 +458,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, if (old_dir != new_dir) { f2fs_set_link(old_inode, old_dir_entry, old_dir_page, new_dir); + F2FS_I(old_inode)->i_pino = new_dir->i_ino; } else { kunmap(old_dir_page); f2fs_put_page(old_dir_page, 0); |