From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CABF6C433F5 for ; Thu, 2 Sep 2021 21:54:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 985B2610A0 for ; Thu, 2 Sep 2021 21:54:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 985B2610A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 40CB06B00C7; Thu, 2 Sep 2021 17:54:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BC3E6B00C8; Thu, 2 Sep 2021 17:54:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D41D6B00C9; Thu, 2 Sep 2021 17:54:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by kanga.kvack.org (Postfix) with ESMTP id 1B3456B00C7 for ; Thu, 2 Sep 2021 17:54:17 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D35E8182B2A33 for ; Thu, 2 Sep 2021 21:54:16 +0000 (UTC) X-FDA: 78543987312.36.A60597C Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf23.hostedemail.com (Postfix) with ESMTP id 7CCA190000A5 for ; Thu, 2 Sep 2021 21:54:16 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 97DCB610D2; Thu, 2 Sep 2021 21:54:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1630619655; bh=ruAREF9T8cIVcYOm7E4vitlBycpDBQe3B/hTSicIUjs=; h=Date:From:To:Subject:In-Reply-To:From; b=XiqYn4UmjYksFgexCYVraGBxnZwWjbD0eoFgV3lIvliV92sP06A61+/wU7g2og7xD zE+vzIhXWemBsqqvjaQwAUw7iGgE8YMxXugvv4kr6fxHwDUDCAYndHEGw5ymZjtnIA UyYNTuhshH2TBfASAijxPoaFjHGeLuR24biztr+k= Date: Thu, 02 Sep 2021 14:54:15 -0700 From: Andrew Morton To: akpm@linux-foundation.org, hughd@google.com, linmiaohe@huawei.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 082/212] shmem: include header file to declare swap_info Message-ID: <20210902215415.PSm8ek2oy%akpm@linux-foundation.org> In-Reply-To: <20210902144820.78957dff93d7bea620d55a89@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=XiqYn4Um; spf=pass (imf23.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 7CCA190000A5 X-Stat-Signature: b1ya8mzhunxmhp1uachdk6mqsrid4jpx X-HE-Tag: 1630619656-963403 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Miaohe Lin Subject: shmem: include header file to declare swap_info It's bad to extern swap_info[] in .c. Include corresponding header file instead. Link: https://lkml.kernel.org/r/20210812120350.49801-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton --- mm/shmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/mm/shmem.c~shmem-include-header-file-to-declare-swap_info +++ a/mm/shmem.c @@ -38,6 +38,7 @@ #include #include #include +#include static struct vfsmount *shm_mnt; @@ -1152,8 +1153,6 @@ static void shmem_evict_inode(struct ino clear_inode(inode); } -extern struct swap_info_struct *swap_info[]; - static int shmem_find_swap_entries(struct address_space *mapping, pgoff_t start, unsigned int nr_entries, struct page **entries, pgoff_t *indices, _