Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3419873yba; Tue, 16 Apr 2019 10:57:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyr/VAoxHc1o0P3G1tE9q2aL+thtmtvwAMZIz5Yr61SgTkaCWcGG7C6wtYJ/ME59ZpJv8U0 X-Received: by 2002:a62:e315:: with SMTP id g21mr83844135pfh.2.1555437436507; Tue, 16 Apr 2019 10:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555437436; cv=none; d=google.com; s=arc-20160816; b=b3YYkVIBCEWpZbngAqXP5hjUpufecls7uKtZJ+9/IhC6HbX9ucjLoahs4vDxXg+DgK 6ddpJz4AH7hKnIhTuZnVLVSjENVbXLl/8LKDapDquHcEgNjLZ9jxQQoc+6zP6d20Ba9E zepeL3nWJMPxJjY0hqEDbiMQanl50ZCWESHcnh/5ljgn6sUuCZETyvLCIDFM4OzgIxBt GLSE0itwBTvh4NA7UkHTG5OQyhZ55zDSUnTWQhKvZt8HlnkvBfbc1nvWc6WLPiyzVCIG kUziejgOsOJGzpNr+LGzwXuFaenhCYIm8wor+XXVU2o/AZSzCHE9ddpFyVRP2XvLL4Xo GfNA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ufMqnyZG7eCKUJ8z6pUfQYwNefyF5DHWyTRjs1vG4uY=; b=v8SbSLr5vHtyT9DTKO84PsxUXyYb+CTi+TKP1/2dcYaX1Nox6SJJZvpk4AgZyFCuc6 PphTPrXBm/XJYW98HLJawlSfacYnWesqY5Jit9ouz0tVnUOBoNTiVicQlsrJKBL+pOKQ cexjSY3y1zggGYUs12DWjOia1FwEchLj66PKsOLF/u8T9+fz1AC3lxumHphZneI+N5Zy ZLFZfGiaqHHN1uSaIOeVU99SmtiBP0PE2r+r6I8IgAe3BvxCNaHzB1URVOGXA3Gex30t OqeTBSfJ5bgnTu875KTPgJTrkv0xGWPu+zfXEMwX0WAFmQaJVpwdJxkRCE9oauQkyqz4 NFkQ== ARC-Authentication-Results: i=1; mx.google.com; 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 b17si41410522pls.15.2019.04.16.10.57.00; Tue, 16 Apr 2019 10:57:16 -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; 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 S1730590AbfDPRyx (ORCPT + 99 others); Tue, 16 Apr 2019 13:54:53 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:57718 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730370AbfDPRxu (ORCPT ); Tue, 16 Apr 2019 13:53:50 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hGSHE-0005aN-QC; Tue, 16 Apr 2019 17:53:48 +0000 From: Al Viro To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [RFC PATCH 59/62] shmem: make use of ->free_inode() Date: Tue, 16 Apr 2019 18:53:37 +0100 Message-Id: <20190416175340.21068-59-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190416175340.21068-1-viro@ZenIV.linux.org.uk> References: <20190416174900.GT2217@ZenIV.linux.org.uk> <20190416175340.21068-1-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro same situation as for hugetlbfs Signed-off-by: Al Viro --- mm/shmem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index b3db3779a30a..dbb7a6dadba7 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3635,9 +3635,8 @@ static struct inode *shmem_alloc_inode(struct super_block *sb) return &info->vfs_inode; } -static void shmem_destroy_callback(struct rcu_head *head) +static void shmem_free_in_core_inode(struct inode *inode) { - struct inode *inode = container_of(head, struct inode, i_rcu); if (S_ISLNK(inode->i_mode)) kfree(inode->i_link); kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode)); @@ -3647,7 +3646,6 @@ static void shmem_destroy_inode(struct inode *inode) { if (S_ISREG(inode->i_mode)) mpol_free_shared_policy(&SHMEM_I(inode)->policy); - call_rcu(&inode->i_rcu, shmem_destroy_callback); } static void shmem_init_inode(void *foo) @@ -3738,6 +3736,7 @@ static const struct inode_operations shmem_special_inode_operations = { static const struct super_operations shmem_ops = { .alloc_inode = shmem_alloc_inode, + .free_inode = shmem_free_in_core_inode, .destroy_inode = shmem_destroy_inode, #ifdef CONFIG_TMPFS .statfs = shmem_statfs, -- 2.11.0