ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/ceph:fix speical error code in ceph_try_get_caps()
@ 2020-04-29  2:01 Wu Bo
  2020-04-29 15:37 ` Jeff Layton
  0 siblings, 1 reply; 2+ messages in thread
From: Wu Bo @ 2020-04-29  2:01 UTC (permalink / raw)
  To: jlayton, sage, idryomov
  Cc: ceph-devel, linux-kernel, liuzhiqiang26, linfeilong, wubo40

There are 3 speical error codes: -EAGAIN/-EFBIG/-ESTALE.
After call try_get_cap_refs function, judge the same 
error code -EAGAIN twice. So corrected the error code of judgment 
from -EAGAIN to -ESTAE.

Signed-off-by: Wu Bo <wubo40@huawei.com>
---
 fs/ceph/caps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 185db76..1a8e20e 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -2749,7 +2749,7 @@ int ceph_try_get_caps(struct inode *inode, int need, int want,
 
 	ret = try_get_cap_refs(inode, need, want, 0, flags, got);
 	/* three special error codes */
-	if (ret == -EAGAIN || ret == -EFBIG || ret == -EAGAIN)
+	if (ret == -EAGAIN || ret == -EFBIG || ret == -ESTALE)
 		ret = 0;
 	return ret;
 }
-- 
1.8.3.1

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

* Re: [PATCH] fs/ceph:fix speical error code in ceph_try_get_caps()
  2020-04-29  2:01 [PATCH] fs/ceph:fix speical error code in ceph_try_get_caps() Wu Bo
@ 2020-04-29 15:37 ` Jeff Layton
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2020-04-29 15:37 UTC (permalink / raw)
  To: Wu Bo, sage, idryomov; +Cc: ceph-devel, linux-kernel, liuzhiqiang26, linfeilong

On Wed, 2020-04-29 at 10:01 +0800, Wu Bo wrote:
> There are 3 speical error codes: -EAGAIN/-EFBIG/-ESTALE.
> After call try_get_cap_refs function, judge the same 
> error code -EAGAIN twice. So corrected the error code of judgment 
> from -EAGAIN to -ESTAE.
> 
> Signed-off-by: Wu Bo <wubo40@huawei.com>
> ---
>  fs/ceph/caps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
> index 185db76..1a8e20e 100644
> --- a/fs/ceph/caps.c
> +++ b/fs/ceph/caps.c
> @@ -2749,7 +2749,7 @@ int ceph_try_get_caps(struct inode *inode, int need, int want,
>  
>  	ret = try_get_cap_refs(inode, need, want, 0, flags, got);
>  	/* three special error codes */
> -	if (ret == -EAGAIN || ret == -EFBIG || ret == -EAGAIN)
> +	if (ret == -EAGAIN || ret == -EFBIG || ret == -ESTALE)
>  		ret = 0;
>  	return ret;
>  }

Good catch! Merged into testing branch.
-- 
Jeff Layton <jlayton@kernel.org>

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

end of thread, other threads:[~2020-04-29 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  2:01 [PATCH] fs/ceph:fix speical error code in ceph_try_get_caps() Wu Bo
2020-04-29 15:37 ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).