linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs:Fix error handling in the function recover_inline_data
@ 2015-08-09 20:12 Nicholas Krause
  0 siblings, 0 replies; only message in thread
From: Nicholas Krause @ 2015-08-09 20:12 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

This fixes error handling in the function recover_inline_data
to check if the function call to truncate_inline_inode has
failed by returning false and if so return immediately to the
caller of recover_inline_data by returning false to signal a
internal failure had occurred when calling this particular function.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 fs/f2fs/inline.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index a13ffcc..e237c44 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -274,7 +274,8 @@ 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);
-- 
2.1.4


------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-09 20:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-09 20:12 [PATCH] f2fs:Fix error handling in the function recover_inline_data Nicholas Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).