aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/inline.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 383db1fabcf4..3258c7cf00d5 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -81,8 +81,10 @@ static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
81 81
82 f2fs_lock_op(sbi); 82 f2fs_lock_op(sbi);
83 ipage = get_node_page(sbi, inode->i_ino); 83 ipage = get_node_page(sbi, inode->i_ino);
84 if (IS_ERR(ipage)) 84 if (IS_ERR(ipage)) {
85 return PTR_ERR(ipage); 85 err = PTR_ERR(ipage);
86 goto out;
87 }
86 88
87 /* 89 /*
88 * i_addr[0] is not used for inline data, 90 * i_addr[0] is not used for inline data,
@@ -90,10 +92,8 @@ static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
90 */ 92 */
91 set_new_dnode(&dn, inode, ipage, NULL, 0); 93 set_new_dnode(&dn, inode, ipage, NULL, 0);
92 err = f2fs_reserve_block(&dn, 0); 94 err = f2fs_reserve_block(&dn, 0);
93 if (err) { 95 if (err)
94 f2fs_unlock_op(sbi); 96 goto out;
95 return err;
96 }
97 97
98 zero_user_segment(page, MAX_INLINE_DATA, PAGE_CACHE_SIZE); 98 zero_user_segment(page, MAX_INLINE_DATA, PAGE_CACHE_SIZE);
99 99
@@ -118,6 +118,7 @@ static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
118 118
119 sync_inode_page(&dn); 119 sync_inode_page(&dn);
120 f2fs_put_dnode(&dn); 120 f2fs_put_dnode(&dn);
121out:
121 f2fs_unlock_op(sbi); 122 f2fs_unlock_op(sbi);
122 return err; 123 return err;
123} 124}