f2fs: fix to return correct error number in f2fs_write_begin

Fix the wrong error number in error path of f2fs_write_begin.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu 2014-12-01 11:30:20 +08:00 committed by Jaegeuk Kim
parent 31a3268839
commit cd34e2969b

View file

@ -960,8 +960,10 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping,
/* check inline_data */ /* check inline_data */
ipage = get_node_page(sbi, inode->i_ino); ipage = get_node_page(sbi, inode->i_ino);
if (IS_ERR(ipage)) if (IS_ERR(ipage)) {
err = PTR_ERR(ipage);
goto unlock_fail; goto unlock_fail;
}
set_new_dnode(&dn, inode, ipage, ipage, 0); set_new_dnode(&dn, inode, ipage, ipage, 0);