From: Jaegeuk Kim Date: Tue, 18 Nov 2014 00:06:55 +0000 (-0800) Subject: f2fs: fix to call put_page at the error handling routine X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6d20aff83c24e9a7f15fffe4be36ed33d24465da;p=linux-beck.git 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 Signed-off-by: Jaegeuk Kim --- 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) ipage = get_node_page(sbi, inode->i_ino); if (IS_ERR(ipage)) { - f2fs_unlock_op(sbi); - return PTR_ERR(ipage); + err = PTR_ERR(ipage); + goto out; } set_new_dnode(&dn, inode, ipage, ipage, 0); @@ -151,7 +151,7 @@ int f2fs_convert_inline_inode(struct inode *inode) err = f2fs_convert_inline_page(&dn, page); f2fs_put_dnode(&dn); - +out: f2fs_unlock_op(sbi); f2fs_put_page(page, 1);