Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp387744pxj; Thu, 20 May 2021 11:37:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKDTVpPHnOn9pO2H6KR3AGTAT8t0rLLoT/5JUaVv/JKWHn5YZZpwkD4wTq7reWsTRgbuqq X-Received: by 2002:a05:6e02:1a03:: with SMTP id s3mr6652844ild.272.1621535829095; Thu, 20 May 2021 11:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621535829; cv=none; d=google.com; s=arc-20160816; b=sraPgL45MT0PA3C0hTdYTp7fcqQItOfGi4NPCnHi72O+fuTikZkUcjMWefbUkOQK9x mRssf6xVkqUs/cnZIV/qFMklj4bfheCeA1YIJBH8w7DuJczzo6Tzskh98p566IiIz3NR u2/NZw2NKTRAj8zK1YFKIIDWq3bQjMV6XRk47UHh+U/Uz+RuWquvvktdRYXKum7GwBOo eIy8nprdcDWP3Tmjk6M3dRAWAr7pPgq9UL4+Cf5TUrVTIfC0h5UYMezIadrZcJhpM4eY PAWh3H8sA+S+k/tmi94qYL5xI3FaO5QwJ1xJK62fByCab82Tl2oGsS7Ivp0zzpDU9HQL TgDA== 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=RYgRN2U+g02aepl/G2Huwhgar22tJXJbio3i+DfM72A=; b=LsmjljgvhOB++ZtA52XQawNtZVC5ZZiULzmVh/GOu5R2HmM/dNRcIq3HNmyH5m9cMj +Q/dxYjtfr3PhnRnVUxvDzdnc/Jr0A3IJh4mzm161RZF02gZ/WwF+FSwaAiqtldQuPkO C2zWeo6f73NnuFlUj2NYZxw4NvvL9xzuGX5yILuBdjWrWIT3Xg5Vq/NuQuuXqC6uSaUp CLL/TR3YxiBkb1eAXdJzLQSitykToJ6reZIbKb9+FMWFSizXegZGNApfyoPg2ru2ruXq aacaoJQ6E4BWXac2Ed/3R+8ELdwv2VvRSyMvOotbcakkc/D2CHEfcLzBBPKngyavPcgq 7yPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QvEGWH7O; 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 j6si3110099iow.6.2021.05.20.11.36.56; Thu, 20 May 2021 11:37:09 -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=QvEGWH7O; 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 S236732AbhETKY0 (ORCPT + 99 others); Thu, 20 May 2021 06:24:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:48156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235943AbhETKNO (ORCPT ); Thu, 20 May 2021 06:13:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B9FFC61447; Thu, 20 May 2021 09:44:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503856; bh=R7Cs3zu7R8x7HragikYOhoog7sCI37/COSBzxK3kMuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QvEGWH7O5g3vHzsH7g5MPCBjFUp/KjLGcq+6VvyQOI6ikU9rBKjUbADyI4QbukUQb j2ADl1/dTih5UUhkj4uhekNlW1fh+olc9H3hyjFf+hoNEX0l2prXh1EoO9zr9chBWK oSkjFwToUNNW8RPLcKB+afnUAYXVcYNnjVsqU9sU= 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.19 411/425] ceph: fix fscache invalidation Date: Thu, 20 May 2021 11:23:00 +0200 Message-Id: <20210520092144.912737300@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 6e871a382209..918781c51f0b 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1779,6 +1779,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 3c24fb77ef32..5f041fede7aa 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1823,6 +1823,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