aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2014-06-24 02:13:13 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-07-09 08:59:11 -0400
commitdd4d961fe7d1cb1cba6e9d8d132475d4917ba864 (patch)
tree8fe7442657db3cf233b320356148e06b7e0efd86 /fs
parent90d72459ccb47335a4348947506fd091e63f7cf8 (diff)
f2fs: release new entry page correctly in error path of f2fs_rename
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/namei.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 9138c32aa698..aa3ddb228f98 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -474,7 +474,8 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
474 return 0; 474 return 0;
475 475
476put_out_dir: 476put_out_dir:
477 f2fs_put_page(new_page, 1); 477 kunmap(new_page);
478 f2fs_put_page(new_page, 0);
478out_dir: 479out_dir:
479 if (old_dir_entry) { 480 if (old_dir_entry) {
480 kunmap(old_dir_page); 481 kunmap(old_dir_page);