From patchwork Wed Nov 10 09:20:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 12611635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24DAFC433EF for ; Wed, 10 Nov 2021 09:21:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 000B061241 for ; Wed, 10 Nov 2021 09:21:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230053AbhKJJXy (ORCPT ); Wed, 10 Nov 2021 04:23:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbhKJJXy (ORCPT ); Wed, 10 Nov 2021 04:23:54 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E458C061764 for ; Wed, 10 Nov 2021 01:21:06 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id e11so3914967ljo.13 for ; Wed, 10 Nov 2021 01:21:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=X1OlPDF4EmsbfxJOTy/84UQNlfFv8Vf+Gr7OO9RQVcU=; b=WWgcicLJ93Z2kC6k+stgsJub6/FneP2DdcqTRu0pMV2lcqsj1xKRlE03G9z8OBP8HL weEr/zQSFmKuRduiY1BmpPe4t4FMH8OeePjIhpkfuvF2DYgsqwrg6N4FzBG5OrMKgdD5 ESSLdfAAwyH78kbaOGXJ/lz6OHiGNPqzh0f4poSqS5TDCv8MGu2k9GUvmM+EBi4YPjPm sGVJ4QFhjfkB/VZQ9zmDbcNSR7AddLknAneTwbIL1ws+56xmHFGfW9cVJf1TuWbNfJiV EpY7F+xWGN+VojVfPL4qPr26JYqDv1IUf0vbnT2yeepyqfNIcmtmTAUjR/8Yrx9La4tp 8IwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=X1OlPDF4EmsbfxJOTy/84UQNlfFv8Vf+Gr7OO9RQVcU=; b=8P3HlCdf7BSXE2s6dEooqOYiWeAhuYFSQWPyl5Ko91PVJNXXy9R+ZFEtQNxXTyxFQW U8Lbvi/RiPrjCZFFinibneR9HzGt+qVRCbTcZZpUUYmu6OKmSAIC6hXBty+Sxt7nxdwm j+wewgZqBdZCIGY5PVqhXeXy5bE01Ps1RXzc0gg2jM8yDJnCoKd+4mqL0tvp/5c8fjBK QMCC1K4l1WGFJ4JEF73G8uWR9P7VSSS0DG6b5ZdrqRt/J8B59cSoREjLOoOTG+so1/FK qxAt/MdElSEjYVgTD4HKxGv3RW5JmSaMlSQoW0L0tnsWm5a4+xAwJgxP+IOCsHpLVOwm G2WA== X-Gm-Message-State: AOAM533bmKOt3Cb0mZrT0Bdb3eVvOfA9Pm16lrESn467cQVQY8NQ0Nxr j6AS1tDWFpE2hGkjWj1okIE0oRgE0WU34RrHZefoXgHoSok= X-Google-Smtp-Source: ABdhPJwrmNj5Zxn7KYUnHAYuKril3V82VhtfXgBr6F2oQxV5ekITswS3fkx29G/OthzFjCEi2wWN17YybknWE5ZoZKs= X-Received: by 2002:a2e:7114:: with SMTP id m20mr14463407ljc.229.1636536064837; Wed, 10 Nov 2021 01:21:04 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Wed, 10 Nov 2021 03:20:53 -0600 Message-ID: Subject: [PATCH] wait until we have the FS info from the server befor initializing fscache cookie To: David Howells , CIFS Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org With this patch now that the fscache cookie is initialized properly - I do see an oops on the 2nd unmount if we mount the same share twice ... any ideas on fixing that? smb3: do not call setup the fscache_super_cookie until fsinfo initialized We were calling cifs_fscache_get_super_cookie after tcon but before we queried the info (QFS_Info) we need to initialize the cookie properly. Suggested-by: David Howells Signed-off-by: Steve French From 090f51ab455dee249a4bc13428f964bd7e848956 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 10 Nov 2021 03:15:29 -0600 Subject: [PATCH] smb3: do not call setup the fscache_super_cookie until fsinfo initialized We were calling cifs_fscache_get_super_cookie after tcon but before we queried the info (QFS_Info) we need to initialize the cookie properly. Suggested-by: David Howells Signed-off-by: Steve French --- fs/cifs/connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index f645f994a523..186c953c47ec 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2349,8 +2349,6 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx) list_add(&tcon->tcon_list, &ses->tcon_list); spin_unlock(&cifs_tcp_ses_lock); - cifs_fscache_get_super_cookie(tcon); - return tcon; out_fail: @@ -3002,6 +3000,8 @@ static int mount_get_conns(struct mount_ctx *mnt_ctx) cifs_dbg(VFS, "read only mount of RW share\n"); /* no need to log a RW mount of a typical RW share */ } + /* The cookie is initialized from volume info returned above */ + cifs_fscache_get_super_cookie(tcon); } /* -- 2.32.0