Received: by 10.223.164.202 with SMTP id h10csp292182wrb; Mon, 6 Nov 2017 06:45:09 -0800 (PST) X-Google-Smtp-Source: ABhQp+T7Xsp3369ouRhuqVyic0xJ4+IKVUUA3uuIT73OzFDvmiaN7yZSQYuC3ppcX3atbxoV0JNd X-Received: by 10.99.99.65 with SMTP id x62mr15670129pgb.221.1509979508901; Mon, 06 Nov 2017 06:45:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509979508; cv=none; d=google.com; s=arc-20160816; b=Tv+o9zWVbSxIJYJLzzhQR+GWJNU5KAn08WAlzDxjXK/9tksU3mihCmlSDje1R8LVx8 x6hWpMMs3nRcfbNbxUVf4biePxQOefrX8N3jB8YXs2rLAAA9xmpKDFBZ6dLZfItMHiGb t/NriZymBZjQZ/He6xuTUI2xGQwL3z8ewnLreWcDqIaRBjwOl2E2krlF9+fvC3MVwDk/ aRkKzZoitBL3FDfEeYWAaVDNr7en1reLh+gWA5rYj23OXeVU+AuXLF+McaKM5BRicOqc sNR3sgbHTOfPB2bBmduy9dK+gLDjGSMtlPtDMN5OVpb42iPUhaHeSPp92B4owuzoQyUh /2uQ== 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 :dmarc-filter:arc-authentication-results; bh=0echjcYd0zxJgK9zS9TYjYeuKyeHcnraQbqO8kKkVUk=; b=LhcgOxh9AOG5nNbDrNamR2c2TGcCNtQDw6uXWD3lnE6p+fnpldIgIujhbI14j/Y19Y e03Ih+RYJGA7Q4kkwPkUoPG96NcvKdAPz31H5nRd/8DQU1J1KvjcH4Zgx9oi2GK2MvU+ AxJCpFPhcwApw6M6IGVLgOCcHFRPGQs59w9GB4nIugxeWxNmVbXU9fJMU4AdOblt3gj8 xCOE5kD/vJEDFi2oqk0rNKbs3sxDbY8LEq+QvExcnoCDvYCcqQ4Vm6QhcDwibIlhytJ2 AWjNvpbqkkyRp6A0Yip45gH8nUsUqCRohKbVZ7Jzo1yx3U/lGif87R8vvGwNE04I6VR2 c25g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si12057160pfl.122.2017.11.06.06.44.55; Mon, 06 Nov 2017 06:45:08 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932459AbdKFOj6 (ORCPT + 97 others); Mon, 6 Nov 2017 09:39:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58076 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932442AbdKFOj4 (ORCPT ); Mon, 6 Nov 2017 09:39:56 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4480613AAB; Mon, 6 Nov 2017 14:39:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4480613AAB Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=marcandre.lureau@redhat.com Received: from localhost (ovpn-112-67.ams2.redhat.com [10.36.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA4085C8BA; Mon, 6 Nov 2017 14:39:51 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: aarcange@redhat.com, hughd@google.com, nyc@holomorphy.com, mike.kravetz@oracle.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v2 1/9] shmem: unexport shmem_add_seals()/shmem_get_seals() Date: Mon, 6 Nov 2017 15:39:36 +0100 Message-Id: <20171106143944.13821-2-marcandre.lureau@redhat.com> In-Reply-To: <20171106143944.13821-1-marcandre.lureau@redhat.com> References: <20171106143944.13821-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 06 Nov 2017 14:39:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The functions are called through shmem_fcntl() only. And no danger in removing the EXPORTs as the routines only work with shmem file structs. Signed-off-by: Marc-André Lureau Reviewed-by: Mike Kravetz --- include/linux/shmem_fs.h | 2 -- mm/shmem.c | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index ed91ce57c428..1f5bf07cb8be 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -110,8 +110,6 @@ extern void shmem_uncharge(struct inode *inode, long pages); #ifdef CONFIG_TMPFS -extern int shmem_add_seals(struct file *file, unsigned int seals); -extern int shmem_get_seals(struct file *file); extern long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg); #else diff --git a/mm/shmem.c b/mm/shmem.c index 07a1d22807be..37260c5e12fa 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2722,7 +2722,7 @@ static int shmem_wait_for_pins(struct address_space *mapping) F_SEAL_GROW | \ F_SEAL_WRITE) -int shmem_add_seals(struct file *file, unsigned int seals) +static int shmem_add_seals(struct file *file, unsigned int seals) { struct inode *inode = file_inode(file); struct shmem_inode_info *info = SHMEM_I(inode); @@ -2791,16 +2791,14 @@ int shmem_add_seals(struct file *file, unsigned int seals) inode_unlock(inode); return error; } -EXPORT_SYMBOL_GPL(shmem_add_seals); -int shmem_get_seals(struct file *file) +static int shmem_get_seals(struct file *file) { if (file->f_op != &shmem_file_operations) return -EINVAL; return SHMEM_I(file_inode(file))->seals; } -EXPORT_SYMBOL_GPL(shmem_get_seals); long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg) { -- 2.15.0.rc0.40.gaefcc5f6f From 1583352095285091127@xxx Mon Nov 06 21:03:47 +0000 2017 X-GM-THRID: 1583352095285091127 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread