Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp95739ybz; Tue, 28 Apr 2020 19:04:51 -0700 (PDT) X-Google-Smtp-Source: APiQypIwoyd2zdgrpZtm3BoL+2cyKf2d/XtfDcao6OOcADnm0DnqfqEQ06bg6jHgNG95tDWGCcz8 X-Received: by 2002:aa7:dc4b:: with SMTP id g11mr488796edu.223.1588125890857; Tue, 28 Apr 2020 19:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588125890; cv=none; d=google.com; s=arc-20160816; b=vyoN/smHCYmOw8nAzM0WdOAhdzLOmtwodtGe5OIHSKtfNljSJX0DiFMocyfotTw/Ez EOf7K39DBnNfEsXBxxw+r62tEJxoodl5ozbWbzHaKH9iTat+Xd03GcAj+K69/4zPwR5c lW32TJDZdTgwqHGEXZdlG3GUBMeAE+Py79NfF00QUoShWyITP+AjQpTwCvTOBkL87Urr VjuLKXH5U2O0ZgBqi39fUSZAuXJShWFHOFSGR07nEzUZjH23wIVXzxe0Tiv9ZxFWkutN zNiksP6iiP7BtVfcO+0qK+HchRGpsrzkiLDI3SIlCGYRrZLjvbZJI8pYzcJNECln1wYY 4VvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=CIZuW+xZ9R/gaWwKTYu3zzJKk/o9+l4d1XCVpqSnF+Q=; b=AVeL+3Dd3kb+13QkDf1ELdSwK0CKHg6xCrbLzUb1BjKg6mekPaUe6hKaYfq6MlZcRz 0/RBYoA5pku4B2XsLT2l/5E26LxAqLzFc6hUTrPyqOs/PjWIUMG91MHiROqifEqBxqJh Q6jIAMnxCfvRj/Zrm0WB9owDUC5rBP26r8SrT3tsjjoN5gv99Y3LvGttEY5th6a5g1HB YYnhiU5LV6yZJ7x1/P5mJaF7q5QYB92xJ1C3G7yM6OhjHwxXKnLVIGCH+aS+2rULp39f RaQqdkO8+hNJYUKZFj5PD6GuZeCAsAbotwMjuBOzNRa5ryeUiD2gD2wkpotKkZkMl/g2 ctpQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id da15si2893512edb.140.2020.04.28.19.04.27; Tue, 28 Apr 2020 19:04:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726619AbgD2CDB (ORCPT + 99 others); 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 Content-Type: text/plain X-Originating-IP: [10.175.105.27] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; } -- 1.8.3.1