]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
f2fs: fix error handling for calls to various functions in the function recover_inlin...
authorNicholas Krause <xerofoify@gmail.com>
Mon, 21 Sep 2015 22:55:49 +0000 (18:55 -0400)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 9 Oct 2015 23:20:53 +0000 (16:20 -0700)
This fixes error handling for calls to various functions in the
function  recover_inline_data to check if these particular functions
either return a error code or the boolean value false to signal their
caller they have failed internally and if this arises return false
to signal failure immediately to the caller of recover_inline_data
as we cannot continue after failures to calling either the function
truncate_inline_inode or truncate_blocks.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/inline.c

index 3d143be428959153872146e4c4bba4278fec2da5..3b18e23319c32c2f670e0b35f435f05d9c00507b 100644 (file)
@@ -274,12 +274,14 @@ process_inline:
        if (f2fs_has_inline_data(inode)) {
                ipage = get_node_page(sbi, inode->i_ino);
                f2fs_bug_on(sbi, IS_ERR(ipage));
-               truncate_inline_inode(ipage, 0);
+               if (!truncate_inline_inode(ipage, 0))
+                       return false;
                f2fs_clear_inline_inode(inode);
                update_inode(inode, ipage);
                f2fs_put_page(ipage, 1);
        } else if (ri && (ri->i_inline & F2FS_INLINE_DATA)) {
-               truncate_blocks(inode, 0, false);
+               if (truncate_blocks(inode, 0, false))
+                       return false;
                goto process_inline;
        }
        return false;