From patchwork Tue May 5 11:58:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 11528891 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 9A55D15E6 for ; Tue, 5 May 2020 11:59:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7E192206B9 for ; Tue, 5 May 2020 11:59:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E192206B9 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 C1D3E8E00C4; Tue, 5 May 2020 07:59:34 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BCDBD8E00C0; Tue, 5 May 2020 07:59:34 -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 A94CF8E00C4; Tue, 5 May 2020 07:59:34 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0085.hostedemail.com [216.40.44.85]) by kanga.kvack.org (Postfix) with ESMTP id 8EA138E00C0 for ; Tue, 5 May 2020 07:59:34 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 577AD8248D51 for ; Tue, 5 May 2020 11:59:34 +0000 (UTC) X-FDA: 76782520668.06.hands44_8db53e81d6511 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:23,LUA_SUMMARY:none X-HE-Tag: hands44_8db53e81d6511 X-Filterd-Recvd-Size: 1712 Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 May 2020 11:59:33 +0000 (UTC) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E7844BA485B2E66112B2; Tue, 5 May 2020 19:59:30 +0800 (CST) Received: from DESKTOP-C3MD9UG.china.huawei.com (10.166.215.55) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Tue, 5 May 2020 19:59:20 +0800 From: Zhen Lei To: Andrew Morton , linux-mm , linux-kernel CC: Zhen Lei Subject: [PATCH 1/1] mm: remove an unnecessary goto jump Date: Tue, 5 May 2020 19:58:58 +0800 Message-ID: <20200505115858.1718-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 76965be1d40e..b1d4f4558e6b 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -235,10 +235,10 @@ int generic_swapfile_activate(struct swap_info_struct *sis, sis->highest_bit = page_no - 1; out: return ret; + bad_bmap: pr_err("swapon: swapfile has holes\n"); - ret = -EINVAL; - goto out; + return -EINVAL; } /*