Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7143ybp; Thu, 3 Oct 2019 09:25:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBoWNp7+HuxTbcHTjUoKyRER5Tpuc0SU35ioRCDNa6yC62o+1dT2mugicqDzz4zToss4Y6 X-Received: by 2002:a17:906:278a:: with SMTP id j10mr8372755ejc.228.1570119915974; Thu, 03 Oct 2019 09:25:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570119915; cv=none; d=google.com; s=arc-20160816; b=tm0fZw13BgahjNvZa50JbamvdDs+S28nTOd879wkMVGR3YsbAW9GDZT8/yCLv3bB8f 1UKBBUv0gNjbGNhGUQsPeuGJRYeFnD0+l285QcZ9787OudugjU6WwnUu3/nXOGzyLRcg 5S3Sjd1Ik6EbYyuGylMOCLGps2gvjiwapvpch0HI0MuMfNL1OYzJ0DBF2XMkGzc8S08u BYGsl/39A/HocP/rUVK/uOg6mNC8hSliTLBB43lFg7/CpRc15JFFHelYJmjIsUd4at1m 4Te1Qq1Fs987aZMpXvUvJGVW2kBP/YLje4Kxmyq1uLIR2m08On0BVlTUGLqQhRjA6csx FfCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lgGJYO9HVQqR8icumW9mKtbfPnWRxDd8o6h9oW2lHZs=; b=dbEly2iP9XdeH6flio0PPqSm2Z8U/bGWADMZ0leNlnme9wd009kNksrF1kNHjRAdX5 KkVlTnxz/FmCmYmWDNCVNZvPZReiZbCDAT8AR/q7IvYZ3SngZFTEuRUwth3fcRi1fDjN 7oKBnejMnNIRdaaD65FV92Wp2HOpvYWA7iZtgqby7v28d3eGZerhJK83rH/4otoFy6ab xPDTLZb+yh1XM1vNBD+vvJ/ab083KRRfw5CyM2DIq311PlHeAi5aGkMGUY78yTbAPKJJ rTvPKC0/i65/3q45JOEd76FD0olcUy4S0yxy5pnXWQUe1uX9zfo/3FVA5gaoOPLqXert Ip6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="CJ/Z28xg"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si1756714edv.21.2019.10.03.09.24.51; Thu, 03 Oct 2019 09:25:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="CJ/Z28xg"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390450AbfJCQXP (ORCPT + 99 others); Thu, 3 Oct 2019 12:23:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:52062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389691AbfJCQXM (ORCPT ); Thu, 3 Oct 2019 12:23:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D3627222CB; Thu, 3 Oct 2019 16:23:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119791; bh=5cRDAKA5t7/TTzGgUnfSvSOrJ2+GOJhdYTJFcryfpfw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CJ/Z28xgkGsAP/ox7Zr4PLCAhFIallqoyNFxsLp9IHfb+Cp03Uo5ejgfN6YVju9RO gSyOScm4dxu/lsTj2LqqiercDy/cOdvBYHouFutmg1gbfI/8UKTsbcll+xIn7OOFxT 0V1FygQVogvPKqJXOVyAZPjkW/KOMSoQV0W1K8x0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sasha Levin Subject: [PATCH 4.19 157/211] Revert "ceph: use ceph_evict_inode to cleanup inodes resource" Date: Thu, 3 Oct 2019 17:53:43 +0200 Message-Id: <20191003154523.940350966@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 812810399999a673d30f9d04d38659030a28051a. The backport was incorrect and was causing kernel panics. Revert and re-apply a correct backport from Jeff Layton. Signed-off-by: Sasha Levin --- fs/ceph/inode.c | 7 ++----- fs/ceph/super.c | 2 +- fs/ceph/super.h | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 665a86f83f4b0..11f19432a74c4 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -528,16 +528,13 @@ static void ceph_i_callback(struct rcu_head *head) kmem_cache_free(ceph_inode_cachep, ci); } -void ceph_evict_inode(struct inode *inode) +void ceph_destroy_inode(struct inode *inode) { struct ceph_inode_info *ci = ceph_inode(inode); struct ceph_inode_frag *frag; struct rb_node *n; - dout("evict_inode %p ino %llx.%llx\n", inode, ceph_vinop(inode)); - - truncate_inode_pages_final(&inode->i_data); - clear_inode(inode); + dout("destroy_inode %p ino %llx.%llx\n", inode, ceph_vinop(inode)); ceph_fscache_unregister_inode_cookie(ci); diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 02528e11bf331..c5cf46e43f2e7 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -827,9 +827,9 @@ static int ceph_remount(struct super_block *sb, int *flags, char *data) static const struct super_operations ceph_super_ops = { .alloc_inode = ceph_alloc_inode, + .destroy_inode = ceph_destroy_inode, .write_inode = ceph_write_inode, .drop_inode = ceph_drop_inode, - .evict_inode = ceph_evict_inode, .sync_fs = ceph_sync_fs, .put_super = ceph_put_super, .remount_fs = ceph_remount, diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 6e968e48e5e4b..0180193097905 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -854,7 +854,7 @@ static inline bool __ceph_have_pending_cap_snap(struct ceph_inode_info *ci) extern const struct inode_operations ceph_file_iops; extern struct inode *ceph_alloc_inode(struct super_block *sb); -extern void ceph_evict_inode(struct inode *inode); +extern void ceph_destroy_inode(struct inode *inode); extern int ceph_drop_inode(struct inode *inode); extern struct inode *ceph_get_inode(struct super_block *sb, -- 2.20.1