public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] jfs: 0 is not valid errno value
@ 2008-05-11 20:08 Marcin Slusarz
  2008-05-12 21:49 ` Dave Kleikamp
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Slusarz @ 2008-05-11 20:08 UTC (permalink / raw)
  To: LKML; +Cc: Dave Kleikamp, jfs-discussion, Alexander Viro

... so return NULL from jfs_lookup

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Dave Kleikamp <shaggy@austin.ibm.com>
Cc: jfs-discussion@lists.sourceforge.net
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
---
is it ok to return NULL from this function?
compile tested only
---
 fs/jfs/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -1455,7 +1455,7 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc
 		free_UCSname(&key);
 		if (rc == -ENOENT) {
 			d_add(dentry, NULL);
-			return ERR_PTR(0);
+			return NULL;
 		} else if (rc) {
 			jfs_err("jfs_lookup: dtSearch returned %d", rc);
 			return ERR_PTR(rc);
-- 

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

* Re: [PATCH] jfs: 0 is not valid errno value
  2008-05-11 20:08 [PATCH] jfs: 0 is not valid errno value Marcin Slusarz
@ 2008-05-12 21:49 ` Dave Kleikamp
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Kleikamp @ 2008-05-12 21:49 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: LKML, jfs-discussion, Alexander Viro

On Sun, 2008-05-11 at 22:08 +0200, Marcin Slusarz wrote:
> ... so return NULL from jfs_lookup
> 
> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>

> Cc: jfs-discussion@lists.sourceforge.net
> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> ---
> is it ok to return NULL from this function?
> compile tested only

Yeah.  I'm not sure how ERR_PTR(0) got in there in the first place.
It's been that way for quite a while.

I'll add it to the jfs git tree.

Thanks,
Shaggy

> ---
>  fs/jfs/namei.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
> --- a/fs/jfs/namei.c
> +++ b/fs/jfs/namei.c
> @@ -1455,7 +1455,7 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc
>  		free_UCSname(&key);
>  		if (rc == -ENOENT) {
>  			d_add(dentry, NULL);
> -			return ERR_PTR(0);
> +			return NULL;
>  		} else if (rc) {
>  			jfs_err("jfs_lookup: dtSearch returned %d", rc);
>  			return ERR_PTR(rc);
-- 
David Kleikamp
IBM Linux Technology Center


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

end of thread, other threads:[~2008-05-12 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-11 20:08 [PATCH] jfs: 0 is not valid errno value Marcin Slusarz
2008-05-12 21:49 ` Dave Kleikamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox