Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp746343ybz; Wed, 29 Apr 2020 08:39:25 -0700 (PDT) X-Google-Smtp-Source: APiQypJtrg0c7U1V0oHEoVRhOCwKlDev+BQ7IBy5RpPFCNr/iwF3EFMjM8vVFQlv5KTu1xHCjaUs X-Received: by 2002:a50:e68e:: with SMTP id z14mr3134185edm.307.1588174765289; Wed, 29 Apr 2020 08:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588174765; cv=none; d=google.com; s=arc-20160816; b=z8HyWyG4SHll9KWOSgAIZPnKUU4uNrH1fbN9oxHRtbtoOAvR0NYXn5GdVirSg9W/21 NjlEm42sCfc8O+QjKWHGReY0lT3s/Vu6gkkc3LMwBKRIUaiNIU32uQoVX2unhjcH/yXR d5EsAcTKbHNtVtRrH5PGwU8li+pK7hd7c/ldlrFKm+kQrrksL+lbj3iARE/rykbTOh28 Rb0k7Se5dhwdKNugkuusDg318wE7Z8fP29e/MfcIlEb0wsQMbuynk4K261U9udjYfSHc NSl/Hoa76J6AG5tHCGJ9qLaoc+PSS3KhPNwTZll94PveiPgVAB3vEZpE1DGbqQbrR9jI KxSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=xlB3nR0yppqBDNkEsfEtHmVuLdKGipwwJVD1MrbL7oo=; b=IhJ3RekKskhZStcH21wBXjpQT87S6xqpDdBxd+cXAaAIrAn90Q8O5iFGcyP5Aq94Va DYWtL2W7hAmQaq3ynmkGIu7I9P2FwNalOeTkCjs/4eyQ4qgUS0Ci7YlUCycEe1AOS8zw yBenNyPHpKHxtTttp6N8Yis4kBtVKcnibsLQOEnU97StCclTaEDjQvGrXQO1SJOYmc9s UWz/Q2bg/Qa+UVK92e/V4OR2tDBln48R6AmDPHBkuLX54p09sBkWYe3syG+fuPFo4Gzg WqrTmzOvXEO8ab6qHXH3kRYnH9ogd0h6+bSUfltdbxAzyPQwjrL62Ps4wFkW7zzIwfUV jHYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="hC/poJiU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w2si3526284edx.70.2020.04.29.08.39.01; Wed, 29 Apr 2020 08:39:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="hC/poJiU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726741AbgD2Ph1 (ORCPT + 99 others); Wed, 29 Apr 2020 11:37:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:56902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726456AbgD2Ph1 (ORCPT ); Wed, 29 Apr 2020 11:37:27 -0400 Received: from tleilax.poochiereds.net (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5C4B5206F0; Wed, 29 Apr 2020 15:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588174647; bh=OC/uuBry5MdIo9PpQACpMz2esvnupqKlJxtQqhDFs7I=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=hC/poJiU62MLjpG2Eb7UzqyClM21ktkHjXXUTqANwMhgAZ6imhdwolsLl1CoYYafR RVkWZyH0JNJmhEvjL2wOxfe0kPAJ85NTi1en9Kghb+R2miMtWserT85WcD1Riis999 zxUzOy04iwTXsSChHZfXUZswXEc6saoeCpBTwIL4= Message-ID: <591b050483a0326bbcaf075254a69bfefc77550f.camel@kernel.org> Subject: Re: [PATCH] fs/ceph:fix speical error code in ceph_try_get_caps() From: Jeff Layton To: Wu Bo , sage@redhat.com, idryomov@gmail.com Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, liuzhiqiang26@huawei.com, linfeilong@huawei.com Date: Wed, 29 Apr 2020 11:37:25 -0400 In-Reply-To: <1588125715-188363-1-git-send-email-wubo40@huawei.com> References: <1588125715-188363-1-git-send-email-wubo40@huawei.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.1 (3.36.1-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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