Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp256778pxj; Thu, 20 May 2021 08:43:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypLePHqykhiDb7sRbQDG1D4K98mLez2t9lYBYV+nChn0DFNy6FdDghYuoFiDwA/DVJ3Hn1 X-Received: by 2002:a05:6402:5174:: with SMTP id d20mr5786436ede.248.1621525400658; Thu, 20 May 2021 08:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621525400; cv=none; d=google.com; s=arc-20160816; b=FUNLOLAu7YBQAVdm3XZNCLrpiuKFLGa3eYdRm2ygXVvqzG8PUhTBvUw5ctohnwBjHA 8C/hRYKHqjgAodOLzr3jCNm18NGHTuvRQxeqpKUehqBCQLp0+fxsgnYm5YDbg+RK+mGD UNr6vxklnE5u+RHLxddHgquwy23JrWqE4DD6Ej1xois8g45JHbokRqsmwsCadGQMkuRa R0WBaoxBWOEeatUgQW8uh2AvPSe9YznLcc6AJQwnJjsCm2vFmJTgDmytve2kZhx+eT95 S/F2JrhD+DerD+7HaxH6yxQMV23EdyxKGgqSGGxLHr13Vk5LNzJvGs50SDZyyUpQ51Ke 2M1Q== 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=11x/U0Ee4K/v5r2XSRiBZm8Ymfng5C024vbZreUuMBg=; b=UgVzEI+d4NJtRD8AyUwteRqKLeHrQmKFflzZhUkU6OsSwyxyJ26rL1AAkKq5qRHD1Z XJ0VIV1LUNz92Osz43AmJ9Dd5+q72h94JA7s7m5CPZtf2M2sepuP7rc0LwQuhTjk6DJH QVDX9FGhBtNLOE0riaQCyLz6wlfdHvlefQI3bdC5JfpsY0glcY1fzB/Grn8GVgAvEh0a r17mkI0+ea1Y1Po5Zojdrn2vGxe7f5BYnqCs1aIygnZ69IyMS4MZb/j5cf0w+EhsPXOs X1XlflBbc+jobIkcZH3sq6EzvAMPYavF5H6w/DEIIW9+Z0FyA7GAmpZYlNTb+TDu6leS qwSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=w47a2GVl; 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 e16si2818190ejj.154.2021.05.20.08.42.56; Thu, 20 May 2021 08:43:20 -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=w47a2GVl; 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 S233019AbhETJhF (ORCPT + 99 others); Thu, 20 May 2021 05:37:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:34676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232500AbhETJen (ORCPT ); Thu, 20 May 2021 05:34:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86DEE61401; Thu, 20 May 2021 09:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621502958; bh=6xE87fb93+R24VnrhjQvU4MC3YwFzRjAut5ARQywGzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w47a2GVl0lHiVnhk85zgDotJYSSNERxjl8pezHUT86pVLfHw6/9e5a2XeuSWBOT/f 8l2H5AodPYEWapq6+g7LhiUTc8ySDT0eeS82Dqmsnbwrbrmfx5vHWKlJiwglDkxfOn WI7qMq0bbYAg6CASjKDsZm65IXbQOmKuuwMCwvGs= 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 5.4 22/37] ceph: fix fscache invalidation Date: Thu, 20 May 2021 11:22:43 +0200 Message-Id: <20210520092053.006342427@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092052.265851579@linuxfoundation.org> References: <20210520092052.265851579@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 22833fa5bb58..a6047caf77ec 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1780,6 +1780,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 660a878e20ef..5beebbbb42f0 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1875,6 +1875,7 @@ static void ceph_do_invalidate_pages(struct inode *inode) 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