* [patch] f2fs: alloc_page() doesn't return an ERR_PTR
@ 2013-08-14 11:41 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-08-14 11:41 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: kernel-janitors, linux-f2fs-devel
alloc_page() returns a NULL on failure, it never returns an ERR_PTR.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index f5172e2..3e87fe0 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1515,8 +1515,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 */
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [patch] f2fs: alloc_page() doesn't return an ERR_PTR
@ 2013-08-14 11:41 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-08-14 11:41 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: kernel-janitors, linux-f2fs-devel
alloc_page() returns a NULL on failure, it never returns an ERR_PTR.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index f5172e2..3e87fe0 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1515,8 +1515,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 */
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [patch] f2fs: alloc_page() doesn't return an ERR_PTR
2013-08-14 11:41 ` Dan Carpenter
@ 2013-08-14 13:24 ` Jaegeuk Kim
-1 siblings, 0 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2013-08-14 13:24 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-f2fs-devel, kernel-janitors
Hi Dan,
Agreed.
Could you make a patch that covers other alloc_page cases too?
# grep alloc_page fs/f2fs/*
fs/f2fs/node.c: page = alloc_page(GFP_NOFS | __GFP_ZERO);
fs/f2fs/recovery.c: page = alloc_page(GFP_F2FS_ZERO);
fs/f2fs/recovery.c: page = alloc_page(GFP_NOFS | __GFP_ZERO);
Thank you,
2013-08-14 (수), 14:41 +0300, Dan Carpenter:
> alloc_page() returns a NULL on failure, it never returns an ERR_PTR.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index f5172e2..3e87fe0 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -1515,8 +1515,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 */
--
Jaegeuk Kim
Samsung
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] f2fs: alloc_page() doesn't return an ERR_PTR
@ 2013-08-14 13:24 ` Jaegeuk Kim
0 siblings, 0 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2013-08-14 13:24 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-f2fs-devel, kernel-janitors
Hi Dan,
Agreed.
Could you make a patch that covers other alloc_page cases too?
# grep alloc_page fs/f2fs/*
fs/f2fs/node.c: page = alloc_page(GFP_NOFS | __GFP_ZERO);
fs/f2fs/recovery.c: page = alloc_page(GFP_F2FS_ZERO);
fs/f2fs/recovery.c: page = alloc_page(GFP_NOFS | __GFP_ZERO);
Thank you,
2013-08-14 (수), 14:41 +0300, Dan Carpenter:
> alloc_page() returns a NULL on failure, it never returns an ERR_PTR.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index f5172e2..3e87fe0 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -1515,8 +1515,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 */
--
Jaegeuk Kim
Samsung
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] f2fs: alloc_page() doesn't return an ERR_PTR
2013-08-14 13:24 ` Jaegeuk Kim
@ 2013-08-14 13:56 ` Dan Carpenter
-1 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-08-14 13:56 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-f2fs-devel, kernel-janitors
On Wed, Aug 14, 2013 at 10:24:36PM +0900, Jaegeuk Kim wrote:
> Hi Dan,
>
> Agreed.
> Could you make a patch that covers other alloc_page cases too?
Sure. Thanks for catching that. I will resend a v2 of this one
which fixes those as well.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] f2fs: alloc_page() doesn't return an ERR_PTR
@ 2013-08-14 13:56 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-08-14 13:56 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-f2fs-devel, kernel-janitors
On Wed, Aug 14, 2013 at 10:24:36PM +0900, Jaegeuk Kim wrote:
> Hi Dan,
>
> Agreed.
> Could you make a patch that covers other alloc_page cases too?
Sure. Thanks for catching that. I will resend a v2 of this one
which fixes those as well.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch v2] f2fs: alloc_page() doesn't return an ERR_PTR
2013-08-14 13:24 ` Jaegeuk Kim
@ 2013-08-15 5:54 ` Dan Carpenter
-1 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-08-15 5:54 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: kernel-janitors, linux-f2fs-devel
alloc_page() returns a NULL on failure, it never returns an ERR_PTR.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: fix the calls in recovery.c as well.
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index f5172e2..3e87fe0 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1515,8 +1515,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 */
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 639eb34..889b4bd 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -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) {
@@ -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);
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [patch v2] f2fs: alloc_page() doesn't return an ERR_PTR
@ 2013-08-15 5:54 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-08-15 5:54 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: kernel-janitors, linux-f2fs-devel
alloc_page() returns a NULL on failure, it never returns an ERR_PTR.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: fix the calls in recovery.c as well.
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index f5172e2..3e87fe0 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1515,8 +1515,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 */
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 639eb34..889b4bd 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -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) {
@@ -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);
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-08-15 5:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14 11:41 [patch] f2fs: alloc_page() doesn't return an ERR_PTR Dan Carpenter
2013-08-14 11:41 ` Dan Carpenter
2013-08-14 13:24 ` Jaegeuk Kim
2013-08-14 13:24 ` Jaegeuk Kim
2013-08-14 13:56 ` Dan Carpenter
2013-08-14 13:56 ` Dan Carpenter
2013-08-15 5:54 ` [patch v2] " Dan Carpenter
2013-08-15 5:54 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.