From patchwork Fri Jul 23 08:00:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 12395745 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 3FE47C4338F for ; Fri, 23 Jul 2021 09:42:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E0E9E60EC0 for ; Fri, 23 Jul 2021 09:42:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E0E9E60EC0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 5F9C96B005D; Fri, 23 Jul 2021 05:42:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A9246B006C; Fri, 23 Jul 2021 05:42:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4BECA6B0070; Fri, 23 Jul 2021 05:42:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 35F9F6B005D for ; Fri, 23 Jul 2021 05:42:46 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CF581248AE for ; Fri, 23 Jul 2021 09:42:45 +0000 (UTC) X-FDA: 78393363090.12.63B6A57 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by imf02.hostedemail.com (Postfix) with ESMTP id 92D8A7001771 for ; Fri, 23 Jul 2021 09:42:44 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10053"; a="208736390" X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="208736390" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2021 02:42:41 -0700 X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="471064809" Received: from liy1-mobl1.ccr.corp.intel.com (HELO yhuang6-mobl1.ccr.corp.intel.com) ([10.254.215.222]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2021 02:42:37 -0700 From: Huang Ying To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Huang Ying , Miaohe Lin , Hugh Dickins , Johannes Weiner , Michal Hocko , Joonsoo Kim , Matthew Wilcox , Minchan Kim Subject: [PATCH] mm,shmem: Fix a typo in shmem_swapin_page() Date: Fri, 23 Jul 2021 16:00:00 +0800 Message-Id: <20210723080000.93953-1-ying.huang@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 92D8A7001771 Authentication-Results: imf02.hostedemail.com; dkim=none; spf=none (imf02.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 192.55.52.93) smtp.mailfrom=ying.huang@intel.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=intel.com (policy=none) X-Stat-Signature: 8sat67htkicdb6im5axyk4hhnhjupxnf X-HE-Tag: 1627033364-898980 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: "-" is missing before "EINVAL". Fixes: 2efa33fc7f6e ("mm/shmem: fix shmem_swapin() race with swapoff") Signed-off-by: "Huang, Ying" Cc: Miaohe Lin Cc: Hugh Dickins Cc: Johannes Weiner Cc: Michal Hocko Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Minchan Kim Signed-off-by: "Huang, Ying" --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index 9af4b2173fe9..e201a3ba12fa 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1708,7 +1708,7 @@ static int shmem_swapin_page(struct inode *inode, pgoff_t index, /* Prevent swapoff from happening to us. */ si = get_swap_device(swap); if (!si) { - error = EINVAL; + error = -EINVAL; goto failed; } /* Look it up and read it in.. */