From cd34e2969b28de7685bb51d4b0fafeced8ef7f66 Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Mon, 1 Dec 2014 11:30:20 +0800 Subject: [PATCH] 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 Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index c7bc62641103..7ec697b37f19 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -960,8 +960,10 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping, /* check inline_data */ ipage = get_node_page(sbi, inode->i_ino); - if (IS_ERR(ipage)) + if (IS_ERR(ipage)) { + err = PTR_ERR(ipage); goto unlock_fail; + } set_new_dnode(&dn, inode, ipage, ipage, 0);