Received: by 10.223.164.202 with SMTP id h10csp772152wrb; Tue, 7 Nov 2017 14:24:58 -0800 (PST) X-Google-Smtp-Source: ABhQp+SKQDEoWRyT+0XJGAq9dbhMqjJLVcEQtntA659Y3FMWgvAfgIi68zTYF9s5D0Oi7POslMzc X-Received: by 10.159.229.130 with SMTP id az2mr209460plb.113.1510093497917; Tue, 07 Nov 2017 14:24:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510093497; cv=none; d=google.com; s=arc-20160816; b=EWq7wzYdr7UV+ty0OCHPGdpQfcCTL5Es3jQi/+4WclPvb0ghZo4O8GAtgtggp2HNPA C3Q0YUkkpU2FYuvLzQMm1CI7ZB7kVwDFLDtrmY7txsVWKgfSpRmEiYlOpXpVviOMcX9g g8Rmb8ei5rYiw+Hw5Gs/X9MFucmlaniUiixI3xWmfU+B6QJh2nBex2up0M36UNxQknNv 3Et3kBPVxRTu25ptZH1R3pU7wJGktCCU+JcO3KGKK3/0fLMz4mVdgInO7RipC81/9FsO Qw9zqsJEa3tjGHKmB6fMkaRlGv3yKGLlErqkzhlAtz1S+wL4c9sBd0Bz3EChjzy1awIc bjHw== 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=/itX6Tc8dHZool09GI80Cweg9sWEv7cLYFn/o8lyOe4=; b=Me1P5KVPDAy8wrR5ScqrO/oHccYjPIBD7hy/wXb5LMGpejz1OoOEELY5aeLcKVYh4W TP22+9L5soXBqjLYqTJbZCbKAb8MGlx21kEKxmOWmnomMpX+ZWAwTpBpqkqRjsveT5qv K8sCp8TjT40OuhdLLZM8ZN2mw0Z5o1RrN10zkebfP0mL+RPcdOWqJhmZpOZeE3fV78zW cH0/lnOpr4MMyq7ZW8kC2gQTA82p5zBvxrk0guFSJfCFFAax2+6d8B2I/u7v272aODT8 +FtXMEyVw1jq2K41lTsDoeomdj2ZxMVNG2BLRv6/lvGGizer59OGCa4pKRgQteB/l/cD 0EPg== 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 b21si130143pfe.291.2017.11.07.14.24.37; Tue, 07 Nov 2017 14:24:57 -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 S1757602AbdKGM2N (ORCPT + 91 others); Tue, 7 Nov 2017 07:28:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58364 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752545AbdKGM2J (ORCPT ); Tue, 7 Nov 2017 07:28:09 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ADA1F7EA97; Tue, 7 Nov 2017 12:28:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ADA1F7EA97 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=marcandre.lureau@redhat.com Received: from localhost (ovpn-112-38.ams2.redhat.com [10.36.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3296860BE3; Tue, 7 Nov 2017 12:28:09 +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 v3 2/9] shmem: rename functions that are memfd-related Date: Tue, 7 Nov 2017 13:27:53 +0100 Message-Id: <20171107122800.25517-3-marcandre.lureau@redhat.com> In-Reply-To: <20171107122800.25517-1-marcandre.lureau@redhat.com> References: <20171107122800.25517-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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 07 Nov 2017 12:28:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Those functions are called for memfd files, backed by shmem or hugetlb (the next patches will handle hugetlb). Signed-off-by: Marc-André Lureau Reviewed-by: Mike Kravetz --- fs/fcntl.c | 2 +- include/linux/shmem_fs.h | 4 ++-- mm/shmem.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index 8d78ffd7b399..ad7995c64370 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -418,7 +418,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, break; case F_ADD_SEALS: case F_GET_SEALS: - err = shmem_fcntl(filp, cmd, arg); + err = memfd_fcntl(filp, cmd, arg); break; case F_GET_RW_HINT: case F_SET_RW_HINT: diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index 1f5bf07cb8be..33b659f62c2b 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -110,11 +110,11 @@ extern void shmem_uncharge(struct inode *inode, long pages); #ifdef CONFIG_TMPFS -extern long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg); +extern long memfd_fcntl(struct file *file, unsigned int cmd, unsigned long arg); #else -static inline long shmem_fcntl(struct file *f, unsigned int c, unsigned long a) +static inline long memfd_fcntl(struct file *f, unsigned int c, unsigned long a) { return -EINVAL; } diff --git a/mm/shmem.c b/mm/shmem.c index 37260c5e12fa..b7811979611f 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) -static int shmem_add_seals(struct file *file, unsigned int seals) +static int memfd_add_seals(struct file *file, unsigned int seals) { struct inode *inode = file_inode(file); struct shmem_inode_info *info = SHMEM_I(inode); @@ -2792,7 +2792,7 @@ static int shmem_add_seals(struct file *file, unsigned int seals) return error; } -static int shmem_get_seals(struct file *file) +static int memfd_get_seals(struct file *file) { if (file->f_op != &shmem_file_operations) return -EINVAL; @@ -2800,7 +2800,7 @@ static int shmem_get_seals(struct file *file) return SHMEM_I(file_inode(file))->seals; } -long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg) +long memfd_fcntl(struct file *file, unsigned int cmd, unsigned long arg) { long error; @@ -2810,10 +2810,10 @@ long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg) if (arg > UINT_MAX) return -EINVAL; - error = shmem_add_seals(file, arg); + error = memfd_add_seals(file, arg); break; case F_GET_SEALS: - error = shmem_get_seals(file); + error = memfd_get_seals(file); break; default: error = -EINVAL; -- 2.15.0.125.g8f49766d64 From 1583978658900978678@xxx Mon Nov 13 19:02:44 +0000 2017 X-GM-THRID: 1576519731154696149 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread