提交 e27dae4d 编写于 作者: D Dan Carpenter 提交者: Jaegeuk Kim

f2fs: alloc_page() doesn't return an ERR_PTR

alloc_page() returns a NULL on failure, it never returns an ERR_PTR.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
上级 479bd73a
...@@ -1517,8 +1517,8 @@ int restore_node_summary(struct f2fs_sb_info *sbi, ...@@ -1517,8 +1517,8 @@ int restore_node_summary(struct f2fs_sb_info *sbi,
/* alloc temporal page for read node */ /* alloc temporal page for read node */
page = alloc_page(GFP_NOFS | __GFP_ZERO); page = alloc_page(GFP_NOFS | __GFP_ZERO);
if (IS_ERR(page)) if (!page)
return PTR_ERR(page); return -ENOMEM;
lock_page(page); lock_page(page);
/* scan the node segment */ /* scan the node segment */
......
...@@ -129,8 +129,8 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head) ...@@ -129,8 +129,8 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
/* read node page */ /* read node page */
page = alloc_page(GFP_F2FS_ZERO); page = alloc_page(GFP_F2FS_ZERO);
if (IS_ERR(page)) if (!page)
return PTR_ERR(page); return -ENOMEM;
lock_page(page); lock_page(page);
while (1) { while (1) {
...@@ -367,7 +367,7 @@ static int recover_data(struct f2fs_sb_info *sbi, ...@@ -367,7 +367,7 @@ static int recover_data(struct f2fs_sb_info *sbi,
/* read node page */ /* read node page */
page = alloc_page(GFP_NOFS | __GFP_ZERO); page = alloc_page(GFP_NOFS | __GFP_ZERO);
if (IS_ERR(page)) if (!page)
return -ENOMEM; return -ENOMEM;
lock_page(page); lock_page(page);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册