Skip to content

Commit

Permalink
f2fs: release new entry page correctly in error path of f2fs_rename
Browse files Browse the repository at this point in the history
This patch correct releasing code of new_page to avoid BUG_ON in error patch of
f2fs_rename.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
chaseyu authored and Jaegeuk Kim committed Jul 9, 2014
1 parent 90d7245 commit dd4d961
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/f2fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
return 0;

put_out_dir:
f2fs_put_page(new_page, 1);
kunmap(new_page);
f2fs_put_page(new_page, 0);
out_dir:
if (old_dir_entry) {
kunmap(old_dir_page);
Expand Down

0 comments on commit dd4d961

Please sign in to comment.