Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7798312rwd; Tue, 6 Jun 2023 17:01:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ56L5vO7mfsMND8TG+2T7ZKhbE+FqwApV02pTGvZqddO7yd+jA+CMCW9PA12hX2lP6M2Hf5 X-Received: by 2002:a05:6a00:14d4:b0:646:b165:1b29 with SMTP id w20-20020a056a0014d400b00646b1651b29mr3179038pfu.23.1686096081392; Tue, 06 Jun 2023 17:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686096081; cv=none; d=google.com; s=arc-20160816; b=XOZIT2Q+P3A0Ykj3aIogb7Ep9f6nJO1qMn5X7k/Ou7wtQ4eI8wKADiPuPI1QH75Id9 20I1ArYIwVyU4QDxkLHPg+meZw0RLqa4rNqDoUF18zNtbkHeCuHh74eN0YuGuhFgjTlW nRCvPFsMfUDqW6zD5979LCyW/bkSrPeu0d1x2KDQpt6hH93SUSVEMPj4NF6Go3MTn59z q6ID+GVg+kIFJA4tHRwI6hfkIGJRNU2oANAokVb3d0Z8se2RPRFIqpSALlMoJ6cl6btp UCJFnvmBMR6pWEbwGiMZIR5IDBs6j6moHFB3aF6ryshik5+mDgPEInPodQnXMY1CbI8p 5vQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=UC70I+iw1YRHovnYL+xRsrLj+374kDEbdSTeCyZnqCg=; b=gthlns4+Yu9Hksl4WkVS0vuKKsOYApPfhQaZbQKizFfkHGlLlzON1YkT8DPdasNKbM s6zw5cZKVCSwoDWBib3XQMRuWUvJjbJjwnSL/CXFXGqzlkXj81ZqZgvAe5QM5XOcM/ve WdXRfT5ujrAgpoBck7FfJNycXCtQdJm+D8FOex8d8d2QroTAbEKHLDfzQpxgbWuRBCsQ buOLG0NVp06Y5qWescPVpAlr6M/hVbukTJvpP62IbUqxVj/jUuHiqRao3231vae6oZh5 aBODzrn6Qxa6TxdG+EhiBvToO+hQ4v0e6QGUkF72LnNkXfWDAxFhWcjby4MNxL3dbbqC Zv4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=yLE5lzsa; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v202-20020a6361d3000000b005440549b770si830316pgb.443.2023.06.06.17.00.39; Tue, 06 Jun 2023 17:01:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=yLE5lzsa; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231890AbjFFXkj (ORCPT + 99 others); Tue, 6 Jun 2023 19:40:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239807AbjFFXki (ORCPT ); Tue, 6 Jun 2023 19:40:38 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87A90170B for ; Tue, 6 Jun 2023 16:40:37 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 356IZAqB000459; Tue, 6 Jun 2023 23:40:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2023-03-30; bh=UC70I+iw1YRHovnYL+xRsrLj+374kDEbdSTeCyZnqCg=; b=yLE5lzsa6L0eGhH2gIpB+7Wro1IOVLn5yZqHn8ZGxvOUwNih0xGtq17N5cTyZyHZg1en VMxkFZkX6RxAW58w2Mvid6sGh5uCb7Tgoyf3eYZJN5PQRRFts8p2B1wYj9Aev+0HcItj U11xcGO1ZJFeerqvmy0oiM5p5gIZKPedih4fYXsFD3LRqUxhSl9dlDTIgOVv/J4jYwQH ULF4B59VVbsaHFM+ek48L3Gq1ebHhytQx/IkCXKAe0Ucu+c98/y73HpavLxhpqzs3+Oq qalaTq3432fXPNvLAmX17tflQweEM8nKa45WlIphT/jF5/baPDoTJpyhRLUk+N9Y55Vy xA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r2a6r8gjj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Jun 2023 23:40:31 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 356N3jtZ037094; Tue, 6 Jun 2023 23:40:30 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3r2a6ggryd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Jun 2023 23:40:30 +0000 Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 356NeUDr005766; Tue, 6 Jun 2023 23:40:30 GMT Received: from ca-common-hq.us.oracle.com (ca-common-hq.us.oracle.com [10.211.9.209]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3r2a6ggry7-1; Tue, 06 Jun 2023 23:40:30 +0000 From: Dai Ngo To: chuck.lever@oracle.com, jlayton@kernel.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH 1/1] NFSD: remove dead code in nfs4_open_delegation Date: Tue, 6 Jun 2023 16:40:19 -0700 Message-Id: <1686094819-13044-1-git-send-email-dai.ngo@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-06_17,2023-06-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306060198 X-Proofpoint-ORIG-GUID: TsBJgWQdjtKsGYkx0lec2BjdJOuKgtVA X-Proofpoint-GUID: TsBJgWQdjtKsGYkx0lec2BjdJOuKgtVA X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org The intention of this code is to tell the client to return the granted delegation immediately for whatever reason in the case of OPEN with NFS4_OPEN_CLAIM_PREVIOUS. However this was already handled above in the cases of switch(open->op_claim_type). Signed-off-by: Dai Ngo --- fs/nfsd/nfs4state.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 6b75656d3e8f..58c78a23f90b 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5632,11 +5632,6 @@ nfs4_open_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp, return; out_no_deleg: open->op_delegate_type = NFS4_OPEN_DELEGATE_NONE; - if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS && - open->op_delegate_type != NFS4_OPEN_DELEGATE_NONE) { - dprintk("NFSD: WARNING: refusing delegation reclaim\n"); - open->op_recall = 1; - } /* 4.1 client asking for a delegation? */ if (open->op_deleg_want) -- 2.9.5