Skip to contentSkip to conversation

f2fs: release new entry page correctly in error path of f2fs_rename

PATCH New Chao Yu 1 participant 1 message Jun 24, 2014

Subsystems (2)
lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/2 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.

---
 fs/f2fs/namei.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/f2fs/namei.c +2 -1
index 0d55517..f17e34c 100644
@@ -475,7 +475,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);
Signature · 1 line
1.7.9.5