From patchwork Wed Apr 29 02:01:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Bo X-Patchwork-Id: 11515807 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 69620112C for ; Wed, 29 Apr 2020 02:03:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BAFC20731 for ; Wed, 29 Apr 2020 02:03:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726551AbgD2CDB (ORCPT ); Tue, 28 Apr 2020 22:03:01 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3375 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726158AbgD2CDA (ORCPT ); Tue, 28 Apr 2020 22:03:00 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9B848580726B20258804; Wed, 29 Apr 2020 10:02:58 +0800 (CST) Received: from huawei.com (10.175.105.27) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Wed, 29 Apr 2020 10:02:51 +0800 From: Wu Bo To: , , CC: , , , , Subject: [PATCH] fs/ceph:fix speical error code in ceph_try_get_caps() Date: Wed, 29 Apr 2020 10:01:55 +0800 Message-ID: <1588125715-188363-1-git-send-email-wubo40@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.105.27] X-CFilter-Loop: Reflected Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org 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; }