linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [patch] f2fs: checking for IS_ERR() instead of NULL
@ 2014-01-09  5:28 Dan Carpenter
  2014-01-09  9:56 ` Jaegeuk Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-01-09  5:28 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-f2fs-devel, kernel-janitors

grab_cache_page_write_begin() returns NULL on error, it doesn't return
error pointers.

Fixes: e18c65b2ac91 ('f2fs: key functions to handle inline data')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 69a923e38f0c..e0d800a1d79f 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -131,8 +131,8 @@ int f2fs_convert_inline_data(struct inode *inode, pgoff_t to_size)
 		return 0;
 
 	page = grab_cache_page_write_begin(inode->i_mapping, 0, AOP_FLAG_NOFS);
-	if (IS_ERR(page))
-		return PTR_ERR(page);
+	if (!page)
+		return -ENOMEM;
 
 	err = __f2fs_convert_inline_data(inode, page);
 	f2fs_put_page(page, 1);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-09  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09  5:28 [patch] f2fs: checking for IS_ERR() instead of NULL Dan Carpenter
2014-01-09  9:56 ` Jaegeuk Kim

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).