aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim2014-11-17 16:14:11 -0800
committerJaegeuk Kim2014-11-18 17:04:33 -0800
commit8cdcb71322ec21aaee90117b0c01d576851a8faa (patch)
tree2d9649029d56739ad82ca1c1db9ef51ceffa203e /fs
parent6d20aff83c24e9a7f15fffe4be36ed33d24465da (diff)
f2fs: put the inode page when error was occurred
We should put the inode page when error was occurred. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/data.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 8f164432408e..12dd58aa569a 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -963,22 +963,22 @@ repeat:
} else if (page->index == 0) {
err = f2fs_convert_inline_page(&dn, page);
if (err)
- goto unlock_fail;
+ goto put_fail;
} else {
struct page *p = grab_cache_page(inode->i_mapping, 0);
if (!p) {
err = -ENOMEM;
- goto unlock_fail;
+ goto put_fail;
}
err = f2fs_convert_inline_page(&dn, p);
f2fs_put_page(p, 1);
if (err)
- goto unlock_fail;
+ goto put_fail;
}
}
err = f2fs_reserve_block(&dn, index);
if (err)
- goto unlock_fail;
+ goto put_fail;
put_next:
f2fs_put_dnode(&dn);
f2fs_unlock_op(sbi);
@@ -1021,6 +1021,8 @@ out:
clear_cold_data(page);
return 0;
+put_fail:
+ f2fs_put_dnode(&dn);
unlock_fail:
f2fs_unlock_op(sbi);
f2fs_put_page(page, 1);