aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-11-17 19:06:55 -0500
committerJaegeuk Kim <jaegeuk@kernel.org>2014-11-18 20:02:47 -0500
commit6d20aff83c24e9a7f15fffe4be36ed33d24465da (patch)
treecce1d809eca221a24fdb40e5f9ff5bd4e8370634 /fs/f2fs
parent92dffd01790a5219d234fc83c3ba854f4490b7f4 (diff)
f2fs: fix to call put_page at the error handling routine
The locked page should be released before returning the function. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/inline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 053d114f0528..f26fb87da163 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -141,8 +141,8 @@ int f2fs_convert_inline_inode(struct inode *inode)
141 141
142 ipage = get_node_page(sbi, inode->i_ino); 142 ipage = get_node_page(sbi, inode->i_ino);
143 if (IS_ERR(ipage)) { 143 if (IS_ERR(ipage)) {
144 f2fs_unlock_op(sbi); 144 err = PTR_ERR(ipage);
145 return PTR_ERR(ipage); 145 goto out;
146 } 146 }
147 147
148 set_new_dnode(&dn, inode, ipage, ipage, 0); 148 set_new_dnode(&dn, inode, ipage, ipage, 0);
@@ -151,7 +151,7 @@ int f2fs_convert_inline_inode(struct inode *inode)
151 err = f2fs_convert_inline_page(&dn, page); 151 err = f2fs_convert_inline_page(&dn, page);
152 152
153 f2fs_put_dnode(&dn); 153 f2fs_put_dnode(&dn);
154 154out:
155 f2fs_unlock_op(sbi); 155 f2fs_unlock_op(sbi);
156 156
157 f2fs_put_page(page, 1); 157 f2fs_put_page(page, 1);