All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] efs: iget_locked() doesn't return an ERR_PTR()
@ 2013-08-14  9:49 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-08-14  9:49 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Serge Hallyn, linux-kernel, kernel-janitors

The iget_locked() function returns NULL on error and never an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/efs/inode.c b/fs/efs/inode.c
index f3913eb..d15ccf2 100644
--- a/fs/efs/inode.c
+++ b/fs/efs/inode.c
@@ -57,7 +57,7 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
 	struct inode *inode;
 
 	inode = iget_locked(super, ino);
-	if (IS_ERR(inode))
+	if (!inode)
 		return ERR_PTR(-ENOMEM);
 	if (!(inode->i_state & I_NEW))
 		return inode;

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

* [patch] efs: iget_locked() doesn't return an ERR_PTR()
@ 2013-08-14  9:49 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-08-14  9:49 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Serge Hallyn, linux-kernel, kernel-janitors

The iget_locked() function returns NULL on error and never an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/efs/inode.c b/fs/efs/inode.c
index f3913eb..d15ccf2 100644
--- a/fs/efs/inode.c
+++ b/fs/efs/inode.c
@@ -57,7 +57,7 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
 	struct inode *inode;
 
 	inode = iget_locked(super, ino);
-	if (IS_ERR(inode))
+	if (!inode)
 		return ERR_PTR(-ENOMEM);
 	if (!(inode->i_state & I_NEW))
 		return inode;

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

* Re: [patch] efs: iget_locked() doesn't return an ERR_PTR()
  2013-08-14  9:49 ` Dan Carpenter
  (?)
@ 2013-08-14 11:57 ` Serge E. Hallyn
  -1 siblings, 0 replies; 3+ messages in thread
From: Serge E. Hallyn @ 2013-08-14 11:57 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Eric W. Biederman, Serge Hallyn, linux-kernel, kernel-janitors

Quoting Dan Carpenter (dan.carpenter@oracle.com):
> The iget_locked() function returns NULL on error and never an ERR_PTR.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>

> diff --git a/fs/efs/inode.c b/fs/efs/inode.c
> index f3913eb..d15ccf2 100644
> --- a/fs/efs/inode.c
> +++ b/fs/efs/inode.c
> @@ -57,7 +57,7 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
>  	struct inode *inode;
>  
>  	inode = iget_locked(super, ino);
> -	if (IS_ERR(inode))
> +	if (!inode)
>  		return ERR_PTR(-ENOMEM);
>  	if (!(inode->i_state & I_NEW))
>  		return inode;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

end of thread, other threads:[~2013-08-14 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14  9:49 [patch] efs: iget_locked() doesn't return an ERR_PTR() Dan Carpenter
2013-08-14  9:49 ` Dan Carpenter
2013-08-14 11:57 ` Serge E. Hallyn

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.