Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp560524pxj; Thu, 20 May 2021 16:15:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/Cl/6Tz2XG6WPLdcDjDqs3Vjjtt/PxgF7oaig0bj32q/Uqq1iy8mhetyx2wjNv52APkl/ X-Received: by 2002:a50:d69c:: with SMTP id r28mr7478298edi.64.1621552515960; Thu, 20 May 2021 16:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621552515; cv=none; d=google.com; s=arc-20160816; b=cg+i54mm23Q3FrkhbeTuin0if5txjKwyuT0Ak/pkJKfGzzep+tRZGxlNzFUcRjvELJ goMOqHpfufYqZuBAwKubJ62qLYJSEK6MfOWvQnQ1+BkQ5JAQVxU4DaoA05HeU8Sr7Gc9 qDCU22BIBAp4FmYf9kbilbdV5DQdC7CoTF2fPckj3KgxC1otOtXcycUaPgc4rU2zvPMt 74zQBajiAfPO6q0cNl7i6Ns/58VbRY2CJnLqnwyLvwQpvfZFPW0Sjv+PdFUbux6y1Uqp oPcIIwhJIZqrc58Wt33BoZuTJ22IpoRwhwkyb0JvNh9OPjiYE9RcgmCAtkCw77o9uUYX veeQ== 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=0VVheUPuMhK0a7GY63tkXAQBAzK4mnlCds8oxRdBszI=; b=pXL0rXPfHH/aoM9Fjjlu4ulAZME0X5vSnJ0wvukfDDo215q78M8MMbi3CKxXuHCy54 Hhy/NTSalxbAebaqxaZG4CocjbRN4yAFQan8F+g5Q/WFrDY54LiIJ0UAw5ZrZSRtVRmO dCqXVTL/fFaV2ZREo6HZb2Iu8mEoK4zYdn3GiRugGptUXDMf4Y+qgtXEQB06PbrUk5sM xC8m0w0fYpliSKIMGI0+qEcbDmF/BzJzuqbBLJUGDpas5el0fZAYkkzG2iTZiuZpJNoI WNTs+s2vLLwa6HlGCrMvXbcLxieGJJUZ1T6czKwBnUiXX90r3PVGfLcIuZc75iDTnMTO 1egA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fEDOdQSK; 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 v7si3621884edd.219.2021.05.20.16.14.52; Thu, 20 May 2021 16:15:15 -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=fEDOdQSK; 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 S241873AbhETLZk (ORCPT + 99 others); Thu, 20 May 2021 07:25:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:39632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239348AbhETLGA (ORCPT ); Thu, 20 May 2021 07:06:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7A17A61D29; Thu, 20 May 2021 10:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505123; bh=q9p/jL1dxlKZfVTF1Fv6oBvpVsnuufUQ/yUS+MlceCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fEDOdQSKmLUxrqC46A55iWgZJEp5dxGhXJxD1nX3pgUsiNvR6fnWPy/Hyi1DAHE4b aeZY0CZZaSd/vRdO1/+QifbWJHD4Rrd5CKojFUWZ+aBNaOzySARxlUEmltWh+AiLli YYFiMEQT9bPzhmEK4HXyhfEvZlLp7tyXxeteQulc= 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.9 234/240] ceph: fix fscache invalidation Date: Thu, 20 May 2021 11:23:46 +0200 Message-Id: <20210520092116.551850574@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092108.587553970@linuxfoundation.org> References: <20210520092108.587553970@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 2a351821d8f3..0eb2ada032c7 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1577,6 +1577,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 049cff197d2a..5e12ea92f7cd 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1762,6 +1762,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