From patchwork Fri May 8 12:06:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 11536409 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D259592A for ; Fri, 8 May 2020 12:07:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B63D4208DB for ; Fri, 8 May 2020 12:07:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B63D4208DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 620418E0003; Fri, 8 May 2020 08:07:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5D0B18E0006; Fri, 8 May 2020 08:07:28 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4EFDD8E0003; Fri, 8 May 2020 08:07:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 372538E0003 for ; Fri, 8 May 2020 08:07:28 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B541B181AEF0B for ; Fri, 8 May 2020 12:07:27 +0000 (UTC) X-FDA: 76793426934.10.toy77_5e2b36b483f2c X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,thunder.leizhen@huawei.com,,RULES_HIT:30012:30054,0,RBL:45.249.212.191:@huawei.com:.lbl8.mailshell.net-62.18.2.100 64.95.201.95,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:22,LUA_SUMMARY:none X-HE-Tag: toy77_5e2b36b483f2c X-Filterd-Recvd-Size: 1922 Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 May 2020 12:07:27 +0000 (UTC) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3F83352ABC14E86219A9; Fri, 8 May 2020 20:07:24 +0800 (CST) Received: from DESKTOP-C3MD9UG.china.huawei.com (10.166.215.55) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Fri, 8 May 2020 20:07:14 +0800 From: Zhen Lei To: David Hildenbrand , Andrew Morton , linux-mm , linux-kernel CC: Zhen Lei Subject: [PATCH v2 1/1] mm/page_io.c: remove an unnecessary goto in generic_swapfile_activate() Date: Fri, 8 May 2020 20:06:40 +0800 Message-ID: <20200508120640.1852-2-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20200508120640.1852-1-thunder.leizhen@huawei.com> References: <20200508120640.1852-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.166.215.55] X-CFilter-Loop: Reflected 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: This "goto" doesn't reduce any code, but bother the readers. Signed-off-by: Zhen Lei Reviewed-by: David Hildenbrand --- mm/page_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 76965be1d40e..19d429abb2cc 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -237,8 +237,7 @@ int generic_swapfile_activate(struct swap_info_struct *sis, return ret; bad_bmap: pr_err("swapon: swapfile has holes\n"); - ret = -EINVAL; - goto out; + return -EINVAL; } /*