From patchwork Thu Mar 25 06:14:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronnie Sahlberg X-Patchwork-Id: 1458164 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=F3sHcJL+; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4F5ZbT1Gq6z9sSC for ; Thu, 25 Mar 2021 17:15:33 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229461AbhCYGO7 (ORCPT ); Thu, 25 Mar 2021 02:14:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35582 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbhCYGOe (ORCPT ); Thu, 25 Mar 2021 02:14:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616652873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=F2xLttf5LIv85p2xnWXxLUMnGByJzMehkk08miJfUko=; b=F3sHcJL+Q0bbbo4A7gIuXbhayCme7ReqJhV5hbTqaTBYbLIPVZf5A3fK+QPGMTjAjRRzwI JbH80iRe1LRdspHH27mv9WkQ5H6JFpPkvuy1HefRR3pF5eBhYHEKquES182cZZI9Nx6roX E4AWyMlkRrY8J9cmGWeNF2ub5V0VtBs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-861CiX0eNG6WL2CPSonZrg-1; Thu, 25 Mar 2021 02:14:29 -0400 X-MC-Unique: 861CiX0eNG6WL2CPSonZrg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A874D5B366; Thu, 25 Mar 2021 06:14:28 +0000 (UTC) Received: from localhost.localdomain (vpn2-54-17.bne.redhat.com [10.64.54.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 256C610023AF; Thu, 25 Mar 2021 06:14:27 +0000 (UTC) From: Ronnie Sahlberg To: linux-cifs Cc: Steve French Subject: [PATCH] cifs: revalidate mapping when we open files for SMB1 POSIX Date: Thu, 25 Mar 2021 16:14:21 +1000 Message-Id: <20210325061421.42753-1-lsahlber@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org RHBZ: 1933527 We have seen read cache surviving across close to open under SMB1 POSIX. Signed-off-by: Ronnie Sahlberg --- fs/cifs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 26de4329d161..042e24aad410 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -165,6 +165,7 @@ int cifs_posix_open(char *full_path, struct inode **pinode, goto posix_open_ret; } } else { + cifs_revalidate_mapping(*pinode); cifs_fattr_to_inode(*pinode, &fattr); }