Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp491157pxj; Thu, 20 May 2021 14:18:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUVDrfssQzp8MBuPu5YIbAo4fDzQl/Zkk569foWJnuxSzYKrmlJ+UjSjwn2US88fBRU+Pc X-Received: by 2002:a17:907:9606:: with SMTP id gb6mr6741930ejc.399.1621545515494; Thu, 20 May 2021 14:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621545515; cv=none; d=google.com; s=arc-20160816; b=VnxQur85PFENvyujM/+1xL3SkdN7AHXE7c2lmdNtxlxxaC1U9pm9foAhWCnEBgJtC5 OMofXo5C9LFDMEiktWMr0GCwYeBkfo62Ynm9KXXxFRIkOm5AuWRYExU4wlU7bS+OZbms nZFqEHjoYrhYtVTAKCXlKkXYNxTklf77C87WE99w803bUVlyd8FLNqR0/Bd5N87r7uJX cknf0dicdFcYjHiBkGsfEBVkNNChn1k009FfgyUZsqrnmtQpBHFugsmZYcc3n9QLhouB S8AaEGsZGmQ4PVVi7WyXcDnL0ziQCmnKOBogyq2csWEcG2E33OevZP0QGge5DB8t4IWl 1FiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BwtiAS9YuZe1lvO5dYmV56OuLLNO1ZrEaQhOcROnd/E=; b=fi0MXrK/xfqH8kC9DW41Y7MxLuTV8U8JWI9+tVBJWvIUTGtDDo7Xo35SwHlgj7KCe+ DHz/mLB+XgFCM+9Vq4osMV3GULV1QzWcVBqKocYM0Nx1XiNq2EYld0Q1BpbZzwJUxEyO 0QSwswnsoDIitlStBLfcA9wv6io5QqZBJsayCrte5HumtlC05rZqwj3tLXBqiU5r4+Y2 gneiV+a0YblgRWRMMUDipw6W2/e1T6tZC6i4AAPPne/G1mL5FOd+XT13xmn3wfsEpeIl o19K5MLzucQBIkGdzDYbRDhQ869+9eHUnJ+u1jAGtMlB9bhZVxTfnlIGWBqu260Vfpyv 5dTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UcNUJFTl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si3838962edd.348.2021.05.20.14.18.11; Thu, 20 May 2021 14:18:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UcNUJFTl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238976AbhETLB4 (ORCPT + 99 others); Thu, 20 May 2021 07:01:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:44686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237541AbhETKno (ORCPT ); Thu, 20 May 2021 06:43:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C318961C88; Thu, 20 May 2021 09:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504609; bh=vk2Efc8N5SpL8dwz0sdJW14go6pdxzXH8AgGNb/LLrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UcNUJFTlJxlzRIhjCdFVf8g+dAiPFgu5gwTE/AzyD0fyw558dT9bncde5hkpO+jmi KkxZENXpXBxrrb3T4gHuHj+h0k0MiSpZBWabJIF+i/ZKguRA+igtFsXrG9cU04l03R 8tVdCySYMLd03Lsdiict4ZoXTFnrTLTNDMm9aiZw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeff Layton , Ilya Dryomov , Sasha Levin Subject: [PATCH 4.14 314/323] ceph: fix fscache invalidation Date: Thu, 20 May 2021 11:23:26 +0200 Message-Id: <20210520092131.011992199@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeff Layton [ Upstream commit 10a7052c7868bc7bc72d947f5aac6f768928db87 ] Ensure that we invalidate the fscache whenever we invalidate the pagecache. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin --- fs/ceph/caps.c | 1 + fs/ceph/inode.c | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 382cf85fd574..b077b9a6bf95 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1662,6 +1662,7 @@ static int try_nonblocking_invalidate(struct inode *inode) u32 invalidating_gen = ci->i_rdcache_gen; spin_unlock(&ci->i_ceph_lock); + ceph_fscache_invalidate(inode); invalidate_mapping_pages(&inode->i_data, 0, -1); spin_lock(&ci->i_ceph_lock); diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 5999d806de78..90db2cd07840 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1757,6 +1757,7 @@ static void ceph_invalidate_work(struct work_struct *work) orig_gen = ci->i_rdcache_gen; spin_unlock(&ci->i_ceph_lock); + ceph_fscache_invalidate(inode); if (invalidate_inode_pages2(inode->i_mapping) < 0) { pr_err("invalidate_pages %p fails\n", inode); } -- 2.30.2