summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorNicholas Krause <xerofoify@gmail.com>2015-09-21 18:55:49 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2015-10-09 16:20:53 -0700
commit545fe4210df5eb4097aa17c68f0f153db27bcf44 (patch)
tree8ddc75d25204b70365c38087e1d44905027b7943 /fs/f2fs
parent9cd81ce3c2f01fc599b9156b94b868b4f578698c (diff)
downloadop-kernel-dev-545fe4210df5eb4097aa17c68f0f153db27bcf44.zip
op-kernel-dev-545fe4210df5eb4097aa17c68f0f153db27bcf44.tar.gz
f2fs: fix error handling for calls to various functions in the function recover_inline_data
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/inline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 3d143be..3b18e23 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -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;
OpenPOWER on IntegriCloud