summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2014-06-24 14:13:13 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2014-07-09 05:59:11 -0700
commitdd4d961fe7d1cb1cba6e9d8d132475d4917ba864 (patch)
tree8fe7442657db3cf233b320356148e06b7e0efd86 /fs/f2fs/namei.c
parent90d72459ccb47335a4348947506fd091e63f7cf8 (diff)
downloadop-kernel-dev-dd4d961fe7d1cb1cba6e9d8d132475d4917ba864.zip
op-kernel-dev-dd4d961fe7d1cb1cba6e9d8d132475d4917ba864.tar.gz
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/f2fs/namei.c')
-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 9138c32..aa3ddb2 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,
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);
OpenPOWER on IntegriCloud