Skip to content

Commit

Permalink
f2fs: alloc_page() doesn't return an ERR_PTR
Browse files Browse the repository at this point in the history
alloc_page() returns a NULL on failure, it never returns an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
  • Loading branch information
Dan Carpenter authored and Jaegeuk Kim committed Aug 19, 2013
1 parent 479bd73 commit e27dae4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fs/f2fs/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -1517,8 +1517,8 @@ int restore_node_summary(struct f2fs_sb_info *sbi,

/* alloc temporal page for read node */
page = alloc_page(GFP_NOFS | __GFP_ZERO);
if (IS_ERR(page))
return PTR_ERR(page);
if (!page)
return -ENOMEM;
lock_page(page);

/* scan the node segment */
Expand Down
6 changes: 3 additions & 3 deletions fs/f2fs/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)

/* read node page */
page = alloc_page(GFP_F2FS_ZERO);
if (IS_ERR(page))
return PTR_ERR(page);
if (!page)
return -ENOMEM;
lock_page(page);

while (1) {
Expand Down Expand Up @@ -367,7 +367,7 @@ static int recover_data(struct f2fs_sb_info *sbi,

/* read node page */
page = alloc_page(GFP_NOFS | __GFP_ZERO);
if (IS_ERR(page))
if (!page)
return -ENOMEM;

lock_page(page);
Expand Down

0 comments on commit e27dae4

Please sign in to comment.