Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6928018rdb; Fri, 15 Dec 2023 12:07:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsA6pDpun31qdtFyYMe4efsNnvwOc42YN15ImMXjvol7xlfPo52SemcRh4MFfhPyrxdq4h X-Received: by 2002:a05:6122:298a:b0:4b2:c554:e9bb with SMTP id fn10-20020a056122298a00b004b2c554e9bbmr11609500vkb.29.1702670825473; Fri, 15 Dec 2023 12:07:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702670825; cv=pass; d=google.com; s=arc-20160816; b=IcXY+xqCLOv3ZqxiVywUuCa8m0OjHiEH4PyWi8DXzUPC2VlLbmnClB3i/8890VbAFp nq8reFyvKFn4kY1i47onfQuAgDABEojmyUvRP4XBzA3nAE+8e1GlypcLq4TF4NDwausK TKC+sIBlJgtmf/FDICIRYFOEuMuAl5CJHV8m4MpRMr7poQw+gCTIOJTs2E6TdthZFbqA OW2WbEKZKfICToajY3oz1q6GDhuiSkglrAP57j9PSqgOeAo3y0VtGjKsko8p58vDLS9C 72NMxj+Q77blTmCQTfD0GI+IYT1NJyS3H1xMYanVFofB8ss0WkRMip6mNCHBnCYMxh52 MSrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:date:message-id:dkim-signature :dkim-signature; bh=lDKkKpMSTeeo8vrYPR+zL7Eii1gt39uyaVU3+GcPzjM=; fh=NpZQBvjtdUsta3JGbS4lMy2PRG5rMS/oMQ+sBsKXjeM=; b=rLFFW7+ICrZ6Gi3ssv5He4/uQtHgJT4k2Er9lMdW/bqbxoDbqviEpWUVsYiSv5w3ea IlnBcLBV9UGDhXSLrk9P+lD5IOMgYCfNg9rFp1KN2u9Ha+mb7tKabLG0jUoj7WXYfICP l/CF2iSq2dW/CRCbcZg94tQ6NoUBgvakB5Ssi2N2Gw8gVO1f9BqMSxzD+9mHyCLa7NcN v/yKCbuDfZHyjK9xEjNAFYTNRjBV/cVcCgcS6ROH81PtFQqZi4WxA2L08eRIY/bvIRCG MOr36HdTLvKZ7p6BQNVOxcOkq1n/lxyxJdeFxU0z9apLgjOLBTO9d7hOa5h9lHQl2SBX DSAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=MHJZNd66; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=wfJtx32q; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-nfs+bounces-643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-643-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k126-20020a1fec84000000b004b69a9af318si956096vkh.222.2023.12.15.12.07.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 12:07:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=MHJZNd66; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=wfJtx32q; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-nfs+bounces-643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-643-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 26F5D1C23BC1 for ; Fri, 15 Dec 2023 20:07:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4443563A2; Fri, 15 Dec 2023 20:02:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="MHJZNd66"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="wfJtx32q" X-Original-To: linux-nfs@vger.kernel.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29E165C911 for ; Fri, 15 Dec 2023 20:02:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BFI47kV023093; Fri, 15 Dec 2023 20:00:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=lDKkKpMSTeeo8vrYPR+zL7Eii1gt39uyaVU3+GcPzjM=; b=MHJZNd66B4cJCwcXnaBPyZPVl7ddmcxgFvvVstfzDHRtfCeUnSIf2Ovxzln7sMlgu3nX WzaWJvNj/Wcm/VFBoca9UjDPMpy1z++4/ALOXna1Cn946sG35gUrYSVLHiUU4+MySIRe PZG8lPtXPeaJhVkGx68bI6BgbuwNCo7kB+qVDpBKXrPVLU6x+holrkvqNY2W8qeCcRpU hoSO7w+3Jc24arOjazbkkl04B6B5grn+4tC6hNRzp01rFPAvB0IjFWMPKCIKOhjaE46r TcE1dYqV77s20Gfpb/JA8T7OMQmA0T066qw230MxPR07/o07qpY4cN0Lhhq6QcnMoE3O jw== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uwgn3var1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Dec 2023 20:00:44 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3BFIK3Wa016638; Fri, 15 Dec 2023 20:00:44 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2041.outbound.protection.outlook.com [104.47.51.41]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uvepchj1x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Dec 2023 20:00:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AFgxI5QUfEh1aDLuNqKjgJ89+fq89Ht4a0T/1K7DZ7wqVsF3R8IxjsdvizfHlZ+LOTLAonhtYpDqLqvs2oyLQa2XHfD2qpzrPEoVTdrqyBxVLIh7KWSRmPsbM1l/+QMmGjX4tm7idQKGxsK/lB8zJi+xUZ8i2hYDpLlG/GYZgyU8CBBFcDBXfyQeGeekTQ30opbzCF12WQZcFb/z0/+E3cr6DE3LvJQMI8EbjPCKOJ1/wXMe18PiLcu5sfusGnTBJ5hwh5OISZe7TY1/0MYsBTnRAgvCV3559tqj0xMVMnfEedlXGGzU7811kJexwRa24fiPfbyc26kENLcfPPufAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lDKkKpMSTeeo8vrYPR+zL7Eii1gt39uyaVU3+GcPzjM=; b=mb3Zx3pAvXVG46znz4iWR79DILu7k97t6K1atSIDoWqLOP06uFW9Up/1BagP600nfnOmkR6RUmrY2ewC1YLSAqmqedgFUvyHD0z72/k4q3lPYP/RS4VBk4hvfFQsnaQelcLUHbX3/y++1iugNtYQjNdgefORvjA3DLTGBks03AZ8CdGXUYj8p9QDdHYnSYDqvuSYwFPAV2uMJ64maTVXPnwqFkLRkxJZXrG+M1AgQiWdudEJ12MEArMJJKysqemVmci9XslnsmtQ1HPEW7ZFS+6QMqp40mHQdy7vJpHqmtV1taAHpCi2nUzCGMAeq0cQPhwAsfcYRpOg88Ox/4ms6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lDKkKpMSTeeo8vrYPR+zL7Eii1gt39uyaVU3+GcPzjM=; b=wfJtx32q8KXZYnHB+XGrHiX1Kih2l4BFFL+pVLvqzinhnXzu6cvScxJ1/pNT/Y0rmelYvsrA51oMvPDuT8Ns/NE7RcbhfyvcqGu7zgxnSxQ3B8UbvCa1FjDBM+6nlrVn10fRK3/3XxCTQKNPscUS7a7dve5pBoTHHqH9le5WR5k= Received: from BY5PR10MB4257.namprd10.prod.outlook.com (2603:10b6:a03:211::21) by BLAPR10MB5284.namprd10.prod.outlook.com (2603:10b6:208:333::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.32; Fri, 15 Dec 2023 20:00:40 +0000 Received: from BY5PR10MB4257.namprd10.prod.outlook.com ([fe80::abad:34ed:7b04:91c5]) by BY5PR10MB4257.namprd10.prod.outlook.com ([fe80::abad:34ed:7b04:91c5%7]) with mapi id 15.20.7091.030; Fri, 15 Dec 2023 20:00:40 +0000 Message-ID: Date: Fri, 15 Dec 2023 12:00:37 -0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] NFSD: restore delegation's sc_count if nfsd4_run_cb fails To: Jeff Layton , chuck.lever@oracle.com Cc: linux-nfs@vger.kernel.org, linux-nfs@stwm.de References: <1702667703-17978-1-git-send-email-dai.ngo@oracle.com> <1702667703-17978-3-git-send-email-dai.ngo@oracle.com> <5b07e47d33925128400559f6c5eef694a9984279.camel@kernel.org> Content-Language: en-US From: dai.ngo@oracle.com In-Reply-To: <5b07e47d33925128400559f6c5eef694a9984279.camel@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BLAPR05CA0028.namprd05.prod.outlook.com (2603:10b6:208:335::9) To BY5PR10MB4257.namprd10.prod.outlook.com (2603:10b6:a03:211::21) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4257:EE_|BLAPR10MB5284:EE_ X-MS-Office365-Filtering-Correlation-Id: 23f6e986-dec8-4260-10eb-08dbfda8837c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yRiA4X/dj9SpOpWZ+oG9LES+qRf0EYL5mkx0m6CMLZWMAVzVdAutvisZJ1hgz869O3u+ukiwFm18zoH9sKZ1E5Gv3VouqzEqV9nWcnT2usSEBobO36MEVyAMpO4MqdsLEHFd8uUHou1tHhWiTyMP88wRgPg5XHfmOudue4/Z0N2JX1VrnqXJlRKPOCuOr1fqBp5uEg1451u52jhAjSywVbYXZokJAi1Jgk3aG3ms63cRThPG4SLprHoTkrhnINMBlekiMXmI8W7mlspksxblcKvTMw8GQGxOSt0oM/v6iWPof0RewZrO/f6lD8kxVIEaA+3qqOKalxMepsl6q+irpXyv3AH/zVZzNtyLzj1iabQi+6NRhLmfQABO4B2NezsD064Cppoo927sda2NaRIsAhBYaJ/kWcbV7jBU9pE+MUv58tmih+tWUVm+1WErsHSB55VQy1nbePJ+VoFhEQyliK4Zz0zPlXp1+D0WWa7mdWDXRwNETv3llBucu9u/V97J/dGLan6mNbDADQupaG0ncYex8LErbTrEwtMPGm/yOMsSrWvffScxDcfz45XPRIe2bPYn+RZHYxY09YsjugBgTG9RQakgYdU2GgjjuC+EC6tFEQ/0ZJetgBuwkxicgHeH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB4257.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(346002)(136003)(376002)(366004)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(2906002)(5660300002)(2616005)(66946007)(66556008)(66476007)(31686004)(478600001)(6486002)(38100700002)(4001150100001)(8936002)(8676002)(4326008)(31696002)(86362001)(6506007)(6666004)(41300700001)(6512007)(9686003)(83380400001)(316002)(26005)(53546011)(36756003)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZktwbWlvUnVWanJ1QVRJYzhWSVhSWnBTTldTMVNnVkZ6dktIRkNzMThFSkpD?= =?utf-8?B?YmU2cTdCcjhWcVRwMXlSM0IyWjdsV2RwTXcvL1grWU4xR001Qy9iQi9UeUlu?= =?utf-8?B?M3FqOFlqSE9vQnU2SE1obzlON2hHcmlJcHF5ZzdRYjk2bzV2czJLN29KQVN3?= =?utf-8?B?U21peDB6S1hHTlh2RFV1Z2NtVXVic1c1UnRaYmN4RUgyMG5XcTJlMCs5ank0?= =?utf-8?B?VXplZDRkRi9pcEtqbFlpbjBtZGNWZXZWaEJJSm5pQnp6anRRc21CaGRpc2cv?= =?utf-8?B?YjJSdU5vRStUWDNISE9WQWhHVDBZMUtWY1lGTzIwemVRSkxmbEYxandQY2JR?= =?utf-8?B?UWhPaUlTaU9BeitRaWYrQktiQ1h4V3VpNDlZMkhzVVRaaEEwTzNKNUhaREha?= =?utf-8?B?VFk2SE5GNkQvdGMwTC9lN04rK2VxTndQY2lad0Q4dzcvbG5va3dEcUxzN01W?= =?utf-8?B?M1VFekI4cTdyQTMxVStRZXNLZkQzY1pyU1BveGRzMUo4VUh0UVBmZDJQcXJQ?= =?utf-8?B?K21mTXVOeiswWW0zL05oK25HVzdWN2g3bk1RREFJT2Z2MUVOenBZUnordGRU?= =?utf-8?B?RldZZkdXd3p6Y2pFZVZYVEgrcVE2ZklyRU9lUGZBTVkzdUVjUWwxMFNya0Ra?= =?utf-8?B?dHk3YS9iMjZiZ3pNQnJydHhUZ05sSnFla0lpSmttaytnNDM4WFlMSFNzN1R5?= =?utf-8?B?RTIxM0RtM0hEa3cvVHdYeE5Va3FITTFQbkhoSXZiVVcrQmVCQ25iZmZDUjNW?= =?utf-8?B?VllDYnlzRHFBeEFvUEdGYVdaMXlZYlh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LkFMVeQ/DF/Ijoe5hX6di2nE1M+LtPDqhMXvqqGXtSXlXP0/ZKVgdqsmSqes9VRNjpB7MYXavIIkVRNBolEd4HnT6HzHNz6mEKzPZ1aDSSYzuCM1BWGw035mfxSH+Mvs2JFh0RQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23f6e986-dec8-4260-10eb-08dbfda8837c X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4257.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2023 20:00:40.7581 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KjPczybXlwEcQsPpGHMvTbSVkf7It2Q/3lZ1+sAafvd8xE75LQDlZ9ile8N7MST4R/mDaIcJIIA3W5KEOH3iBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5284 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-15_10,2023-12-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 spamscore=0 mlxscore=0 adultscore=0 phishscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312150139 X-Proofpoint-ORIG-GUID: nX1WFiVDpP5tidcWJIOl37vpbGVMgQq3 X-Proofpoint-GUID: nX1WFiVDpP5tidcWJIOl37vpbGVMgQq3 On 12/15/23 11:42 AM, Jeff Layton wrote: > On Fri, 2023-12-15 at 11:15 -0800, Dai Ngo wrote: >> Under some load conditions the callback work request can not be queued >> and nfsd4_run_cb returns 0 to caller. When this happens, the sc_count >> of the delegation state was left with an extra reference count preventing >> the state to be freed later. >> >> Signed-off-by: Dai Ngo >> --- >> fs/nfsd/nfs4state.c | 17 +++++++++++++---- >> 1 file changed, 13 insertions(+), 4 deletions(-) >> >> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c >> index 40415929e2ae..175f3e9f5822 100644 >> --- a/fs/nfsd/nfs4state.c >> +++ b/fs/nfsd/nfs4state.c >> @@ -2947,8 +2947,14 @@ void nfs4_cb_getattr(struct nfs4_cb_fattr *ncf) >> >> if (test_and_set_bit(CB_GETATTR_BUSY, &ncf->ncf_cb_flags)) >> return; >> + >> refcount_inc(&dp->dl_stid.sc_count); >> - nfsd4_run_cb(&ncf->ncf_getattr); >> + if (!nfsd4_run_cb(&ncf->ncf_getattr)) { >> + refcount_dec(&dp->dl_stid.sc_count); >> + clear_bit(CB_GETATTR_BUSY, &ncf->ncf_cb_flags); >> + wake_up_bit(&ncf->ncf_cb_flags, CB_GETATTR_BUSY); >> + WARN_ON_ONCE(1); >> + } >> } >> >> static struct nfs4_client *create_client(struct xdr_netobj name, >> @@ -4967,7 +4973,10 @@ static void nfsd_break_one_deleg(struct nfs4_delegation *dp) >> * we know it's safe to take a reference. >> */ >> refcount_inc(&dp->dl_stid.sc_count); >> - WARN_ON_ONCE(!nfsd4_run_cb(&dp->dl_recall)); >> + if (!nfsd4_run_cb(&dp->dl_recall)) { >> + refcount_dec(&dp->dl_stid.sc_count); >> + WARN_ON_ONCE(1); >> + } >> } >> >> /* Called from break_lease() with flc_lock held. */ >> @@ -8543,12 +8552,12 @@ nfsd4_deleg_getattr_conflict(struct svc_rqst *rqstp, struct inode *inode, >> return 0; >> } >> break_lease: >> - spin_unlock(&ctx->flc_lock); >> nfsd_stats_wdeleg_getattr_inc(); >> - >> dp = fl->fl_owner; >> ncf = &dp->dl_cb_fattr; >> nfs4_cb_getattr(&dp->dl_cb_fattr); >> + spin_unlock(&ctx->flc_lock); >> + > The other hunks in this patch make sense, but what's going on here with > moving the lock down? Do we really need to hold the spinlock there? If > so, I would have expected to see an explanation in the changelog. We need to hold the flc_lock to prevent the lease to be removed which allows the delegation state to be released. We need to do this since we just do the refcount_dec if nfsd4_run_cb fails, instead of doing nfs4_put_stid to free the state if this is the last refcount. This is done to match the logic in nfsd_break_deleg_cb which has an useful comment in nfsd_break_one_deleg. -Dai > >> wait_on_bit(&ncf->ncf_cb_flags, CB_GETATTR_BUSY, TASK_INTERRUPTIBLE); >> if (ncf->ncf_cb_status) { >> status = nfserrno(nfsd_open_break_lease(inode, NFSD_MAY_READ));