f2fs: fix to return correct error number in f2fs_write_begin
authorChao Yu <chao2.yu@samsung.com>
Mon, 1 Dec 2014 03:30:20 +0000 (11:30 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 1 Dec 2014 21:56:02 +0000 (13:56 -0800)
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>
fs/f2fs/data.c

index c7bc6264110349abba3471cbdbb6329303261d08..7ec697b37f19316e0476869ec79b491e6370b3f6 100644 (file)
@@ -960,8 +960,10 @@ repeat:
 
        /* 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);