[patch] f2fs: checking for IS_ERR() instead of NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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);
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux