From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A4A5C55178 for ; Sat, 24 Oct 2020 09:41:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0033D22273 for ; Sat, 24 Oct 2020 09:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603532476; bh=fjeG9wJtnh0c/pyJHgNGNcDONu14mHkOx/dVk5B1dhA=; h=Subject:To:Cc:From:Date:List-ID:From; b=nSiIgbEAzi2MCSP3v8IvQoioctcQ8cFCGGDjTgXUuutFdtXOmh/9x+Ea8RySjDtZu n9Ya5d0BPLsODxINyVs7z9KpJGIi5AOpdIWtevpZEO+X//8PDasKoQUumSHKWik+e+ V9De6BajGZoPnzU1J3y0ZXS67cRgfSVbtcVMyODo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760492AbgJXJlO (ORCPT ); Sat, 24 Oct 2020 05:41:14 -0400 Received: from wforward2-smtp.messagingengine.com ([64.147.123.31]:36487 "EHLO wforward2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760452AbgJXJlO (ORCPT ); Sat, 24 Oct 2020 05:41:14 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailforward.west.internal (Postfix) with ESMTP id CDB2860C; Sat, 24 Oct 2020 05:41:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 24 Oct 2020 05:41:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Cr9IAp GADXEXGG85BQcWXy88IsCCTIjNfNI8XWtub40=; b=IpYnsoDU4A2llAQkzT7ter +/rtRihDD5V1DbUcqHcV0tbLjXWQ0YCv3E91sR8KJrs0x6p83tmlyv91WmUVpLWe RXAY6us/33OyP3hMw/tYpXDt1KFRpKD+6gwEI8V2nP28HdayXOrSoY6Vry5pA7Sg SePnH1q9QlRp1PemCqLs4Q9Y26QCVIYU2DbGPu26bEIsUc5a0G3Dlz1c150k5o8k us4aC7ZW+HIywGrBRQAuMjnBSoGkSvGD+8cTWUsLob25VIznWwEca4vsyi/WZHJ6 Clls6wFWfhoZGVnIoXD5y9zsZPbm9BT2QODQwd+0Y55nvB0qqrwIhnGkWVwvA69A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkedvgddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertddttd flnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg qeenucggtffrrghtthgvrhhnpeeiteevheeuvdfhtdfgvdeiieehheefleevveehjedute evueevledujeejgfetheenucfkphepkeefrdekiedrjeegrdeigeenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtg homh X-ME-Proxy: Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) by mail.messagingengine.com (Postfix) with ESMTPA id DA4BC3064674; Sat, 24 Oct 2020 05:41:12 -0400 (EDT) Subject: FAILED: patch "[PATCH] smb3: do not try to cache root directory if dir leases not" failed to apply to 5.4-stable tree To: stfrench@microsoft.com, stable@vger.kernel.org Cc: From: Date: Sat, 24 Oct 2020 11:41:47 +0200 Message-ID: <160353250724318@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 3c6e65e679182d55779ef6f8582f0945af4319b0 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 21 Oct 2020 00:15:42 -0500 Subject: [PATCH] smb3: do not try to cache root directory if dir leases not supported To servers which do not support directory leases (e.g. Samba) it is wasteful to try to open_shroot (ie attempt to cache the root directory handle). Skip attempt to open_shroot when server does not indicate support for directory leases. Cuts the number of requests on mount from 17 to 15, and cuts the number of requests on stat of the root directory from 4 to 3. Signed-off-by: Steve French CC: Stable # v5.1+ diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d096cfda56eb..3a9980bf0d6e 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3608,7 +3608,10 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) */ tcon->retry = volume_info->retry; tcon->nocase = volume_info->nocase; - tcon->nohandlecache = volume_info->nohandlecache; + if (ses->server->capabilities & SMB2_GLOBAL_CAP_DIRECTORY_LEASING) + tcon->nohandlecache = volume_info->nohandlecache; + else + tcon->nohandlecache = 1; tcon->nodelete = volume_info->nodelete; tcon->local_lease = volume_info->local_lease; INIT_LIST_HEAD(&tcon->pending_opens);