Received: by 10.192.165.148 with SMTP id m20csp4295517imm; Mon, 23 Apr 2018 23:44:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+62QVF3tyYQPNwMOAFuxTT2EdXw5by9b/DDZyhM+KdLZUn1FoT9bnga327zuaXx1mwBKhN X-Received: by 10.101.78.206 with SMTP id w14mr12463630pgq.83.1524552245405; Mon, 23 Apr 2018 23:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524552245; cv=none; d=google.com; s=arc-20160816; b=hWCRJmcsXaUIntqFA7rTmbTi0e1RtknqpAWe+T9o1PgLUa4hAye+XC1isQBhEpz/tl wDivl209Fjf4UWnTve+oJx2quxl8XETBjSwoG+myJDZVNf067JkqD/BtmMaWV9MuzMKs O++mEpW5WJ0yWKwBVO0usnlj7pG7ViRgXj9qVNjuAdx6HsKZrOQ1qiYWuNao1d1iuvqL JYaTOE7SPwssbxnMDmVzwOoJwkUAlDnd8p/CeljuP/xJ7waAJwJXnvZ5C5+6RykIUwvN T6LaSfZarQBBOidWN7KWANtgGQcK5v0uJIyAZyeuztftml+u9QAm2tmfK+4LUZVln7vD 5qWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=2E+PVWYgwocvmOAj1zL1v3J5a9Bkvh1WZD/gXkqdXIg=; b=WaWt+r5b7hLWk8NrEuAYduZyhQmSB8bb3oHde41a6Ie9qSp+LiX1cp7i3X3f3oSiBv XR7fOMY1cTFiMsQxmNzDSnbCEynp54wuO9kr1mIumquj4w71Wl+RmlQjnYCgpFCnjooi LgOk8qevZjjIgX9o6Di0BnvUI9Rhzp8gWB5D5bC7hKIIS0vvj9L15NpP/J12rCTOXwBn ZJKlrUAhZGLFyQ58ajo8t7D2XvQybjvYoBELR/XxWfO6taols2JIYvht37OLicJY28jb gTQz3VEYO6O9yju6Wz9Kk22MdcZc1pdTEKK5+pO3vApMc4qReIrc7cH/Iqq3XlGexBHx /0xQ== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5-v6si14326796pln.598.2018.04.23.23.43.51; Mon, 23 Apr 2018 23:44:05 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756450AbeDXGmP (ORCPT + 99 others); Tue, 24 Apr 2018 02:42:15 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60674 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756195AbeDXGmJ (ORCPT ); Tue, 24 Apr 2018 02:42:09 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3O6d8eQ137532 for ; Tue, 24 Apr 2018 02:42:08 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hhwnycqca-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 Apr 2018 02:42:08 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Apr 2018 07:42:06 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 24 Apr 2018 07:42:04 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3O6g33w49807524; Tue, 24 Apr 2018 06:42:03 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA7E6AE051; Tue, 24 Apr 2018 07:31:46 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 651C8AE056; Tue, 24 Apr 2018 07:31:45 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.99]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 24 Apr 2018 07:31:45 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Tue, 24 Apr 2018 09:42:01 +0300 From: Mike Rapoport To: Andrew Morton Cc: Andrea Arcangeli , linux-mm , lkml , Mike Rapoport Subject: [PATCH 2/2] mm/ksm: move [set_]page_stable_node from ksm.h to ksm.c Date: Tue, 24 Apr 2018 09:41:46 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524552106-7356-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1524552106-7356-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18042406-0020-0000-0000-0000041527DC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042406-0021-0000-0000-000042A9888A Message-Id: <1524552106-7356-3-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-24_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804240067 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The page_stable_node() and set_page_stable_node() are only used in mm/ksm.c and there is no point to keep them in the include/linux/ksm.h Signed-off-by: Mike Rapoport --- include/linux/ksm.h | 11 ----------- mm/ksm.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/linux/ksm.h b/include/linux/ksm.h index bbdfca3..161e816 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h @@ -37,17 +37,6 @@ static inline void ksm_exit(struct mm_struct *mm) __ksm_exit(mm); } -static inline struct stable_node *page_stable_node(struct page *page) -{ - return PageKsm(page) ? page_rmapping(page) : NULL; -} - -static inline void set_page_stable_node(struct page *page, - struct stable_node *stable_node) -{ - page->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM); -} - /* * When do_swap_page() first faults in from swap what used to be a KSM page, * no problem, it will be assigned to this vma's anon_vma; but thereafter, diff --git a/mm/ksm.c b/mm/ksm.c index 16451a2..58c2741 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -827,6 +827,18 @@ static int unmerge_ksm_pages(struct vm_area_struct *vma, /* * Only called through the sysfs control interface: */ + +static inline struct stable_node *page_stable_node(struct page *page) +{ + return PageKsm(page) ? page_rmapping(page) : NULL; +} + +static inline void set_page_stable_node(struct page *page, + struct stable_node *stable_node) +{ + page->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM); +} + static int remove_stable_node(struct stable_node *stable_node) { struct page *page; -- 2.7.4