All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: fix improper handling of return errno
@ 2016-05-23  2:30 Eric Ren
  2016-05-23  3:21 ` Joseph Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Ren @ 2016-05-23  2:30 UTC (permalink / raw)
  To: ocfs2-devel

Previously, if bad inode was found in ocfs2_iget(), -ESTALE?was
returned back to the caller anyway. Since commit d2b9d71a2da7
("ocfs2: check/fix inode block for online file check") can handle
with return value from ocfs2_read_locked_inode() now, we know the
exact errno returned for us.

Signed-off-by: Eric Ren <zren@suse.com>
---
 fs/ocfs2/inode.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index ba495be..fee5ec6 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -176,12 +176,7 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,
 	}
 	if (is_bad_inode(inode)) {
 		iput(inode);
-		if ((flags & OCFS2_FI_FLAG_FILECHECK_CHK) ||
-		    (flags & OCFS2_FI_FLAG_FILECHECK_FIX))
-			/* Return OCFS2_FILECHECK_ERR_XXX related errno */
-			inode = ERR_PTR(rc);
-		else
-			inode = ERR_PTR(-ESTALE);
+		inode = ERR_PTR(rc);
 		goto bail;
 	}
 
-- 
2.6.6

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

* [Ocfs2-devel] [PATCH] ocfs2: fix improper handling of return errno
  2016-05-23  2:30 [Ocfs2-devel] [PATCH] ocfs2: fix improper handling of return errno Eric Ren
@ 2016-05-23  3:21 ` Joseph Qi
  2016-05-23  5:34   ` Gang He
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Qi @ 2016-05-23  3:21 UTC (permalink / raw)
  To: ocfs2-devel

On 2016/5/23 10:30, Eric Ren wrote:
> Previously, if bad inode was found in ocfs2_iget(), -ESTALE was
> returned back to the caller anyway. Since commit d2b9d71a2da7
> ("ocfs2: check/fix inode block for online file check") can handle
> with return value from ocfs2_read_locked_inode() now, we know the
> exact errno returned for us.
> 
> Signed-off-by: Eric Ren <zren@suse.com>
Looks good to me, thanks.
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>

> ---
>  fs/ocfs2/inode.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
> index ba495be..fee5ec6 100644
> --- a/fs/ocfs2/inode.c
> +++ b/fs/ocfs2/inode.c
> @@ -176,12 +176,7 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,
>  	}
>  	if (is_bad_inode(inode)) {
>  		iput(inode);
> -		if ((flags & OCFS2_FI_FLAG_FILECHECK_CHK) ||
> -		    (flags & OCFS2_FI_FLAG_FILECHECK_FIX))
> -			/* Return OCFS2_FILECHECK_ERR_XXX related errno */
> -			inode = ERR_PTR(rc);
> -		else
> -			inode = ERR_PTR(-ESTALE);
> +		inode = ERR_PTR(rc);
>  		goto bail;
>  	}
>  
> 

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

* [Ocfs2-devel] [PATCH] ocfs2: fix improper handling of return errno
  2016-05-23  3:21 ` Joseph Qi
@ 2016-05-23  5:34   ` Gang He
  0 siblings, 0 replies; 3+ messages in thread
From: Gang He @ 2016-05-23  5:34 UTC (permalink / raw)
  To: ocfs2-devel




>>> 
> On 2016/5/23 10:30, Eric Ren wrote:
>> Previously, if bad inode was found in ocfs2_iget(), -ESTALE was
>> returned back to the caller anyway. Since commit d2b9d71a2da7
>> ("ocfs2: check/fix inode block for online file check") can handle
>> with return value from ocfs2_read_locked_inode() now, we know the
>> exact errno returned for us.
>> 
>> Signed-off-by: Eric Ren <zren@suse.com>
> Looks good to me, thanks.
> Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Reviewed-by: Gang He <ghe@suse.com>

> 
>> ---
>>  fs/ocfs2/inode.c | 7 +------
>>  1 file changed, 1 insertion(+), 6 deletions(-)
>> 
>> diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
>> index ba495be..fee5ec6 100644
>> --- a/fs/ocfs2/inode.c
>> +++ b/fs/ocfs2/inode.c
>> @@ -176,12 +176,7 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 
> blkno, unsigned flags,
>>  	}
>>  	if (is_bad_inode(inode)) {
>>  		iput(inode);
>> -		if ((flags & OCFS2_FI_FLAG_FILECHECK_CHK) ||
>> -		    (flags & OCFS2_FI_FLAG_FILECHECK_FIX))
>> -			/* Return OCFS2_FILECHECK_ERR_XXX related errno */
>> -			inode = ERR_PTR(rc);
>> -		else
>> -			inode = ERR_PTR(-ESTALE);
>> +		inode = ERR_PTR(rc);
>>  		goto bail;
>>  	}
>>  
>> 
> 
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com 
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel

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

end of thread, other threads:[~2016-05-23  5:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23  2:30 [Ocfs2-devel] [PATCH] ocfs2: fix improper handling of return errno Eric Ren
2016-05-23  3:21 ` Joseph Qi
2016-05-23  5:34   ` Gang He

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.